Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/lumio-codec/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ pub struct CodecWorkspace {
scratch: Mutex<Vec<u8>>,
}

impl Default for CodecWorkspace {
fn default() -> Self {
Self::new()
}
}

impl CodecWorkspace {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -41,6 +47,12 @@ pub struct CodecResource {
destroyed: AtomicBool,
}

impl Default for CodecResource {
fn default() -> Self {
Self::new()
}
}

impl CodecResource {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-job/src/cancel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ pub struct CancellationView {
flag: Arc<AtomicBool>,
}

impl Default for CancellationSource {
fn default() -> Self {
Self::new()
}
}

impl CancellationSource {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-job/src/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ pub struct OperationRegistry {
kernels: HashMap<OperationId, Arc<dyn TypedKernel>>,
}

impl Default for OperationRegistry {
fn default() -> Self {
Self::new()
}
}

impl OperationRegistry {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-kernel/src/context/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ pub struct ResourceRegistry {
items: Mutex<Vec<Arc<dyn ContextResource>>>,
}

impl Default for ResourceRegistry {
fn default() -> Self {
Self::new()
}
}

impl ResourceRegistry {
pub fn new() -> Self {
Self {
Expand Down
5 changes: 5 additions & 0 deletions crates/lumio-platform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ name = "lumio-platform"
version.workspace = true
edition.workspace = true
publish.workspace = true
# `benches/clock.rs` is compiled as a `cfg(test)` module via `#[path]` from `lib.rs`
# (criterion is not approved; EXTERNAL_ALLOWLIST is empty). Cargo's bench
# auto-discovery would additionally register it as a bench target, where its
# `use crate::{..}` does not resolve (E0432) and `--all-targets` fails.
autobenches = false

[dependencies]
6 changes: 6 additions & 0 deletions crates/lumio-platform/src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ pub struct StdMonotonicClock {
epoch: Instant,
}

impl Default for StdMonotonicClock {
fn default() -> Self {
Self::new()
}
}

impl StdMonotonicClock {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-spatial/src/index/grid_reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ pub struct GridReferenceIndex {
objects: BTreeMap<SpatialObjectId, Aabb3>,
}

impl Default for GridReferenceIndex {
fn default() -> Self {
Self::new()
}
}

impl GridReferenceIndex {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-spatial/src/index/rstar_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ pub struct RStarIndexAdapter {
inner: GridReferenceIndex,
}

impl Default for RStarIndexAdapter {
fn default() -> Self {
Self::new()
}
}

impl RStarIndexAdapter {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-spatial/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ pub struct SpatialContext {
index: GridReferenceIndex,
}

impl Default for SpatialContext {
fn default() -> Self {
Self::new()
}
}

impl SpatialContext {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions crates/lumio-spatial/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ pub struct SpatialResource {
destroyed: AtomicBool,
}

impl Default for SpatialResource {
fn default() -> Self {
Self::new()
}
}

impl SpatialResource {
pub fn new() -> Self {
Self {
Expand Down
18 changes: 18 additions & 0 deletions crates/lumio-test-support/src/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ pub struct FixtureLoader {
_private: (),
}

impl Default for FixtureLoader {
fn default() -> Self {
Self::new()
}
}

impl FixtureLoader {
pub fn new() -> Self {
Self { _private: () }
Expand All @@ -29,6 +35,12 @@ pub struct FaultPlan {
_private: (),
}

impl Default for FaultPlan {
fn default() -> Self {
Self::new()
}
}

impl FaultPlan {
pub fn new() -> Self {
Self { _private: () }
Expand All @@ -40,6 +52,12 @@ pub struct PanicProbe {
_private: (),
}

impl Default for PanicProbe {
fn default() -> Self {
Self::new()
}
}

impl PanicProbe {
pub fn new() -> Self {
Self { _private: () }
Expand Down
12 changes: 6 additions & 6 deletions xtask/src/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ fn must_not_contain(errors: &mut Vec<String>, rel: &str, body: &str, needle: &st

/// SHA-256 hex of `path` via `sha256sum` (CI) or `certutil` (Windows).
pub fn file_sha256_hex(path: &Path) -> Result<String, String> {
if let Ok(out) = Command::new("sha256sum").arg(path).output() {
if out.status.success() {
let text = String::from_utf8_lossy(&out.stdout);
if let Some(hex) = text.split_whitespace().next() {
return Ok(hex.to_ascii_lowercase());
}
if let Ok(out) = Command::new("sha256sum").arg(path).output()
&& out.status.success()
{
let text = String::from_utf8_lossy(&out.stdout);
if let Some(hex) = text.split_whitespace().next() {
return Ok(hex.to_ascii_lowercase());
}
}
let out = Command::new("certutil")
Expand Down
Loading