Skip to content

Commit

Permalink
md-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Nov 21, 2024
1 parent 10d784f commit ba7d7c2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let dtf = DateTimeFormatter::try_new(
let date = DateTime::try_new_iso(2020, 9, 12, 12, 35, 0).expect("datetime should be valid");
let date = date.to_any();

let formatted_date = dtf.format_any_calendar(&date).to_string_lossy();
let formatted_date = dtf.format_any_calendar(&date).to_string();
assert_eq!(
formatted_date,
"12 de septiembre de 2020, 12:35:00"
Expand Down
6 changes: 3 additions & 3 deletions tutorials/data_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn main() {
.expect("datetime should be valid");
let date = date.to_any();
let formatted_date = dtf.format_any_calendar(&date).to_string_lossy();
let formatted_date = dtf.format_any_calendar(&date).to_string();
println!("📅: {}", formatted_date);
}
Expand Down Expand Up @@ -182,7 +182,7 @@ fn main() {
.expect("datetime should be valid");
let date = date.to_any();
let formatted_date = dtf.format_any_calendar(&date).to_string_lossy();
let formatted_date = dtf.format_any_calendar(&date).to_string();
println!("📅: {}", formatted_date);
}
Expand Down Expand Up @@ -234,7 +234,7 @@ fn main() {
let date = DateTime::try_new_gregorian(2020, 10, 14, 13, 21, 28)
.expect("datetime should be valid");
let formatted_date = dtf.format(&date).to_string_lossy();
let formatted_date = dtf.format(&date).to_string();
println!("📅: {}", formatted_date);
}
Expand Down
2 changes: 1 addition & 1 deletion tutorials/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn main() {
// For smaller codesize you can use FixedCalendarDateTimeFormatter<Gregorian> with a DateTime<Gregorian>
let date = date.to_any();

let formatted_date = dtf.format_any_calendar(&date).to_string_lossy();
let formatted_date = dtf.format_any_calendar(&date).to_string();

println!("📅: {}", formatted_date);
}
Expand Down
2 changes: 1 addition & 1 deletion tutorials/intro_interactive.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ let date_formatter = DateTimeFormatter::try_new(
println!(
"Date: {}",
date_formatter
.format_any_calendar(&iso_date.to_any()).to_string_lossy()
.format_any_calendar(&iso_date.to_any()).to_string()
);
```

Expand Down
2 changes: 1 addition & 1 deletion tutorials/rust/buffer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn main() {
let datetime = DateTime::try_new_gregorian(2022, 12, 23, 12, 54, 29)
.expect("constant should be valid datetime");

let result = formatter.format(&datetime).to_string_lossy();
let result = formatter.format(&datetime).to_string();

assert_eq!(result, "၂၀၂၂ ဒီ ၂၃ ၁၂:၅၄:၂၉");
println!("{result}");
Expand Down

0 comments on commit ba7d7c2

Please sign in to comment.