Skip to content

Commit

Permalink
fix broken documentation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiral committed Jul 28, 2022
1 parent 0d26997 commit 80c3d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fmtfloat!(f32 f64);
/// my_vars.insert("Alpha".to_string(),42.0);
/// my_vars.insert("Beta".to_string(),PI);
///
/// println!(strfmt("{Alpha} {Beta:<5.2}",&my_vars)?);
/// println!("{}", strfmt("{Alpha} {Beta:<5.2}",&my_vars).unwrap());
/// ```
pub fn strfmt<'a, K, T: DisplayStr>(fmtstr: &str, vars: &HashMap<K, T>) -> Result<String>
where
Expand Down Expand Up @@ -148,7 +148,7 @@ pub trait Format {
/// my_vars.insert("Alpha".to_string(),42.0);
/// my_vars.insert("Beta".to_string(),PI);
///
/// println!("|{Alpha}|{Beta:<5.2}|".format(&my_vars)?);
/// println!("{}", "|{Alpha}|{Beta:<5.2}|".format(&my_vars).unwrap());
/// ```
fn format<K, D: DisplayStr>(&self, vars: &HashMap<K, D>) -> Result<String>
where
Expand Down

0 comments on commit 80c3d8b

Please sign in to comment.