Skip to content

Commit

Permalink
fixed the testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Jul 10, 2024
1 parent b033593 commit ca90ef5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/main-api/src/calendar/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ pub enum EventType {

impl Display for EventType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let str = serde_json::to_string(self).map_err(|_| std::fmt::Error)?;
f.write_str(&str)
let mut str = serde_json::to_string(self).map_err(|_| std::fmt::Error)?;
let _ = str.remove(0);
let _ = str.remove(str.len() - 1);
write!(f, "{str}")
}
}

0 comments on commit ca90ef5

Please sign in to comment.