MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / fmt

Method fmt

atomic-agent/src/learnings.rs:452–478  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

450
451impl std::fmt::Display for SaveResult {
452 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
453 if self.added > 0 {
454 write!(
455 f,
456 "Added {} learning{} to {}",
457 self.added,
458 if self.added == 1 { "" } else { "s" },
459 self.file_path.display(),
460 )?;
461 if self.skipped_duplicates > 0 {
462 write!(f, " ({} already present)", self.skipped_duplicates)?;
463 }
464 } else {
465 write!(
466 f,
467 "All {} learning{} already in {}",
468 self.skipped_duplicates,
469 if self.skipped_duplicates == 1 {
470 ""
471 } else {
472 "s"
473 },
474 self.file_path.display(),
475 )?;
476 }
477 Ok(())
478 }
479}
480
481// Section Building Helpers

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected