MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / or_default_with_log

Method or_default_with_log

rust/src/error.rs:147–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145 }
146
147 fn or_default_with_log(self) -> T
148 where
149 T: Default,
150 {
151 match self {
152 Ok(value) => value,
153 Err(e) => {
154 eprintln!("Warning: B+ Tree operation failed, using default: {}", e);
155 T::default()
156 }
157 }
158 }
159}

Callers 2

Calls

no outgoing calls

Tested by 2