chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6222746
)
bundles: Provide Display for Id
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 2 May 2021 20:54:27 +0000
(21:54 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 2 May 2021 20:54:27 +0000
(21:54 +0100)
Nothing uses this yet but maybe it will be useful.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs
patch
|
blob
|
history
diff --git
a/src/bundles.rs
b/src/bundles.rs
index 948aca7e1af264a5feec9fc54a6ebc5ba2dd41bb..b9c56bfd0dcd20696632184d35b7418286d7ade6 100644
(file)
--- a/
src/bundles.rs
+++ b/
src/bundles.rs
@@
-88,6
+88,13
@@
where S: Display + Debug
index, suffix)
}
+impl Display for Id {
+ #[throws(fmt::Error)]
+ fn fmt(&self, f: &mut fmt::Formatter) {
+ write!(f, "{}.{}", self.index, self.kind)?
+ }
+}
+
impl Id {
fn path_tmp(&self, instance: &InstanceName) -> String {
b_file(instance, self.index, "tmp")