refactor(crates): implement std::error::Error for all module error enums
thiserror derive across oakundo/oakcommon/oaknode/oaktimeline/oaktask/ oakotio/oakcodec/oakaudio/oakrender/oakplugin/oakengine/oakstorage; Display carries the module prefix and the Failed context, source() stays default except oakotio's #[from] forwarding. code() mappings and variants unchanged; each error.rs gains Display/object-safety/code regression tests.
This commit is contained in:
@@ -87,15 +87,12 @@ impl WaveformCache {
|
||||
/// when missing. Failures (missing media, no audio stream) leave the
|
||||
/// clip silent (no waveform drawn).
|
||||
pub fn refresh(&self, clip: u64, filename: &str, duration_frames: i64) {
|
||||
eprintln!("DBG-WFC: refresh clip={clip}");
|
||||
if self.get(clip).is_some() {
|
||||
eprintln!("DBG-WFC: cache hit");
|
||||
return;
|
||||
}
|
||||
let Some(waveform) = extract(filename, duration_frames, self.fps) else {
|
||||
return;
|
||||
};
|
||||
eprintln!("DBG-WFC: inserting");
|
||||
let mut map = self.map.lock().unwrap_or_else(|e| e.into_inner());
|
||||
if !map.contains_key(&clip) {
|
||||
map.insert(clip, Arc::new(waveform));
|
||||
|
||||
Reference in New Issue
Block a user