mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-11 04:16:55 +00:00
cleanup dead crate
This commit is contained in:
1 parent
6427b2163a
commit
1b6496f80c
8 files changed
-113
No files matched your search
Generated
-15
@@ -3841,20 +3841,6 @@ dependencies = [
|
||||
"workspace-build-acceleration",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "enums_public"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"enums",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"strum",
|
||||
"toml 1.0.7+spec-1.1.0",
|
||||
"utoipa",
|
||||
"workspace-build-acceleration",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "enums_shared"
|
||||
version = "0.0.1"
|
||||
@@ -11275,7 +11261,6 @@ dependencies = [
|
||||
"enums_api",
|
||||
"enums_convert",
|
||||
"enums_db",
|
||||
"enums_public",
|
||||
"errors",
|
||||
"fal_client",
|
||||
"ffmpeg_utils",
|
||||
|
||||
@@ -115,7 +115,6 @@ members = [
|
||||
"crates/schema/public/enums_convert",
|
||||
"crates/schema/public/enums_db",
|
||||
"crates/schema/public/enums_shared",
|
||||
"crates/schema/public/enums_public",
|
||||
"crates/schema/public/reusable_types", # TODO(bt, 2022-12-21): Deprecate
|
||||
"crates/schema/public/tokens",
|
||||
|
||||
@@ -240,7 +239,6 @@ enums_api = { path = "crates/schema/public/enums_api" }
|
||||
enums_convert = { path = "crates/schema/public/enums_convert" }
|
||||
enums_db = { path = "crates/schema/public/enums_db" }
|
||||
enums_shared = { path = "crates/schema/public/enums_shared" }
|
||||
enums_public = { path = "crates/schema/public/enums_public" }
|
||||
errors = { path = "crates/lib/errors" }
|
||||
fal_client = { path = "crates/api_clients/fal_client" }
|
||||
ffmpeg_utils = { path = "crates/lib/ffmpeg_utils" }
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
[package]
|
||||
name = "enums_public"
|
||||
edition = "2018"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
"Brandon Thomas <bt@brand.io>",
|
||||
"Brandon Thomas <echelon@gmail.com>",
|
||||
]
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "enums_public"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["workspace-build-acceleration"]
|
||||
|
||||
[dependencies]
|
||||
# Workspace hack (faster compile times)
|
||||
workspace-build-acceleration = { workspace = true }
|
||||
|
||||
# Internal
|
||||
enums = { workspace = true }
|
||||
|
||||
# Serialization
|
||||
serde = { workspace = true }
|
||||
serde_derive = { workspace = true }
|
||||
|
||||
utoipa.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
# Enum utilities
|
||||
strum.workspace = true
|
||||
|
||||
# Test serialization
|
||||
serde_json = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
@@ -1 +0,0 @@
|
||||
pub mod model_weights;
|
||||
@@ -1,2 +0,0 @@
|
||||
// Moved to enums_api crate as WeightsType:
|
||||
// pub mod public_weights_types;
|
||||
@@ -1,27 +0,0 @@
|
||||
//! enums_public
|
||||
//!
|
||||
//! Sometimes we want to hide which enums we allow over the API
|
||||
//! to keep competitors in the dark about what we're doing.
|
||||
//!
|
||||
|
||||
// Never allow these
|
||||
#![forbid(private_bounds)]
|
||||
#![forbid(private_interfaces)]
|
||||
#![forbid(unused_must_use)] // NB: It's unsafe to not close/check some things
|
||||
|
||||
// Okay to toggle
|
||||
#![forbid(unreachable_patterns)]
|
||||
#![deny(unused_imports)]
|
||||
#![forbid(unused_mut)]
|
||||
#![forbid(unused_variables)]
|
||||
|
||||
// Always allow
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use] extern crate serde_derive;
|
||||
|
||||
#[cfg(test)] pub mod test_helpers;
|
||||
|
||||
pub mod by_table;
|
||||
@@ -1,27 +0,0 @@
|
||||
//! Only imported in tests
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
pub fn to_toml<T: Serialize>(t: &T) -> String {
|
||||
match toml::to_string(t) {
|
||||
Ok(s) => s.replace("\"", ""), // JSON values are quoted, so we remove quotes
|
||||
Err(err) => {
|
||||
panic!("serialization error: {}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_json<T: Serialize>(t: &T) -> String {
|
||||
serde_json::to_string(t)
|
||||
.expect("serialization error")
|
||||
.replace("\"", "") // JSON values are quoted, so we remove quotes
|
||||
}
|
||||
|
||||
/// Assert that the Serialize is represented by the expected string value.
|
||||
/// This is useful for ensuring stability of serialization.
|
||||
pub fn assert_serialization<T: Serialize>(t: T, expected: &str) {
|
||||
// TODO: See if there's a way to check the sqlx serialization
|
||||
// TODO(bt,2024-06-27): Something broke with serde toml serialization, so we're disabling it
|
||||
// assert_eq!(&to_toml(&t), expected);
|
||||
assert_eq!(&to_json(&t), expected);
|
||||
}
|
||||
@@ -53,7 +53,6 @@ enums.workspace = true
|
||||
enums_api.workspace = true
|
||||
enums_convert.workspace = true
|
||||
enums_db.workspace = true
|
||||
enums_public.workspace = true
|
||||
errors.workspace = true
|
||||
fal_client.workspace = true
|
||||
filesys.workspace = true
|
||||
|
||||
Reference in new issue
Block a user