mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-11-21 10:50:38 +08:00
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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user