feat(src/msg.rs): add RunId::as_str method

This makes it easier to use the run ID as a string, without creating a
whole new String value.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-08-02 18:33:27 +03:00
parent 9d912e6ee6
commit eeb79ef090
+7
View File
@@ -77,6 +77,13 @@ impl fmt::Display for RunId {
}
}
impl RunId {
/// Return representation of identifier as a string slice.
pub fn as_str(&self) -> &str {
&self.id
}
}
/// The result of a CI run.
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]