[workspace]
members = ["derive"]
[workspace.package]
authors = ["Jip J. Dekker <jip@dekker.one>"]
version = "0.2.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Dekker1/deepclone"
rust-version = "1.85"
[package]
name = "deepclone"
description = "Deep clone that copies shared data once: an `Rc`/`Arc` reached twice becomes one new `Rc`/`Arc`"
keywords = ["deepcopy", "clone", "rc", "sharing", "trait-object"]
categories = ["rust-patterns", "memory-management"]
readme = "README.md"
exclude = [".github", ".gitignore", "release-plz.toml", "rustfmt.toml"]
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
[features]
default = ["derive"]
derive = ["dep:deepclone-derive"]
[dependencies]
deepclone-derive = { version = "=0.2.0", path = "derive", optional = true }
rustc-hash = "2.1"
[dev-dependencies]
divan = "0.1"
trybuild = "1.0"
[[bench]]
name = "overhead"
harness = false
required-features = ["derive"]
[lints]
workspace = true
[package.metadata.docs.rs]
all-features = true
[workspace.lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
non_ascii_idents = "deny"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unit_bindings = "warn"
unnameable_types = "warn"
unreachable_pub = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"
[workspace.lints.clippy]
allow_attributes_without_reason = "deny"
cargo_common_metadata = "warn"
clone_on_ref_ptr = "warn"
default_union_representation = "deny"
implicit_clone = "warn"
missing_docs_in_private_items = "warn"
mixed_read_write_in_expression = "deny"
multiple_crate_versions = "warn"
negative_feature_names = "deny"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_feature_names = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_name_method = "warn"
semicolon_if_nothing_returned = "warn"
str_to_string = "warn"
string_add = "warn"
string_add_assign = "warn"
string_lit_chars_any = "warn"
tests_outside_test_module = "warn"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unseparated_literal_suffix = "warn"
unnecessary_safety_doc = "warn"
wildcard_dependencies = "warn"
wrong_self_convention = "warn"