zfc

Library for sets according to ZFC.
git clone https://git.philomathiclife.com/repos/zfc
Log | Files | Refs | README

commit 006d3c83879a90a2fd124d5dbd08d50723c3f879
parent 694b649ecfe37a270eba6b2f7ff4c25b40b1fc53
Author: Zack Newman <zack@philomathiclife.com>
Date:   Mon, 13 Jul 2026 13:18:34 -0600

bump msrv. update deps. new lints

Diffstat:
MCargo.toml | 11+++++++----
Msrc/lib.rs | 3+++
Asrc/tests.rs | 12++++++++++++
3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" name = "zfc" readme = "README.md" repository = "https://git.philomathiclife.com/repos/zfc/" -rust-version = "1.93.1" -version = "0.4.7" +rust-version = "1.97.0" +version = "0.5.0" [lints.rust] deprecated-safe = { level = "deny", priority = -1 } @@ -28,12 +28,14 @@ unused = { level = "deny", priority = -1 } warnings = { level = "deny", priority = -1 } ambiguous-negative-literals = { level = "deny", priority = -1 } closure-returning-async-block = { level = "deny", priority = -1 } +dead-code-pub-in-binary = { level = "deny", priority = -1 } deprecated-in-future = { level = "deny", priority = -1 } +#deprecated-llvm-intrinsic = { level = "deny", priority = -1 } deref-into-dyn-supertrait = { level = "deny", priority = -1 } ffi-unwind-calls = { level = "deny", priority = -1 } #fuzzy-provenance-casts = { level = "deny", priority = -1 } impl-trait-redundant-captures = { level = "deny", priority = -1 } -linker-messages = { level = "deny", priority = -1 } +linker-info = { level = "deny", priority = -1 } #lossy-provenance-casts = { level = "deny", priority = -1 } macro-use-extern-crate = { level = "deny", priority = -1 } meta-variable-misuse = { level = "deny", priority = -1 } @@ -85,6 +87,7 @@ missing_trait_methods = "allow" pub_use = "allow" ref_patterns = "allow" single_char_lifetime_names = "allow" +unseparated_literal_suffix = "allow" [lints.rustdoc] all = { level = "deny", priority = -1 } @@ -106,7 +109,7 @@ targets = [ ] [dependencies] -num-bigint = { version = "0.4.6", default-features = false } +num-bigint = { version = "0.5.1", default-features = false } ### FEATURES ################################################################# diff --git a/src/lib.rs b/src/lib.rs @@ -13,6 +13,9 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![no_std] extern crate alloc; +/// Unit tests. +#[cfg(test)] +mod tests; use alloc::{collections::BTreeSet, vec::Vec}; use core::{ borrow::Borrow, diff --git a/src/tests.rs b/src/tests.rs @@ -0,0 +1,12 @@ +use super::{BTreeSet, BigUint, Cardinality, Set as _}; +#[test] +fn set_vec() { + let mut set = BTreeSet::new(); + _ = set.insert(3u32); + _ = set.insert(1u32); + _ = set.insert(2u32); + assert_eq!( + set.cardinality(), + Some(Cardinality::Finite(BigUint::new_const(3))) + ); +}