diff --git a/packages/quicktype-core/src/language/Rust/RustRenderer.ts b/packages/quicktype-core/src/language/Rust/RustRenderer.ts index 79b25acea..6e0a6653f 100644 --- a/packages/quicktype-core/src/language/Rust/RustRenderer.ts +++ b/packages/quicktype-core/src/language/Rust/RustRenderer.ts @@ -13,8 +13,10 @@ import { type ClassType, type EnumType, type Type, UnionType } from "../../Type" import { matchType, nullableFromUnion, removeNullFromUnion } from "../../TypeUtils"; import { keywords } from "./constants"; -import { Density, Visibility, type rustOptions } from "./language"; +import { type rustOptions } from "./language"; import { + Density, + Visibility, camelNamingFunction, getPreferedNamingStyle, listMatchingNamingStyles, diff --git a/packages/quicktype-core/src/language/Rust/language.ts b/packages/quicktype-core/src/language/Rust/language.ts index 0c206884e..2f62883ea 100644 --- a/packages/quicktype-core/src/language/Rust/language.ts +++ b/packages/quicktype-core/src/language/Rust/language.ts @@ -4,17 +4,7 @@ import { TargetLanguage } from "../../TargetLanguage"; import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../../types"; import { RustRenderer } from "./RustRenderer"; - -export enum Density { - Normal = "Normal", - Dense = "Dense" -} - -export enum Visibility { - Private = "Private", - Crate = "Crate", - Public = "Public" -} +import { Density, Visibility } from "./utils"; export const rustOptions = { density: new EnumOption("density", "Density", [ diff --git a/packages/quicktype-core/src/language/Rust/utils.ts b/packages/quicktype-core/src/language/Rust/utils.ts index 5806f63a3..1b086f545 100644 --- a/packages/quicktype-core/src/language/Rust/utils.ts +++ b/packages/quicktype-core/src/language/Rust/utils.ts @@ -14,6 +14,17 @@ import { utf32ConcatMap } from "../../support/Strings"; +export enum Density { + Normal = "Normal", + Dense = "Dense" +} + +export enum Visibility { + Private = "Private", + Crate = "Crate", + Public = "Public" +} + type NameToParts = (name: string) => string[]; type PartsToName = (parts: string[]) => string; interface NamingStyle {