]> git.lizzy.rs Git - rust.git/blobdiff - src/libgetopts/lib.rs
rollup merge of #21457: alexcrichton/issue-21436
[rust.git] / src / libgetopts / lib.rs
index c2114d4c6df6df57a36bb8460609b60cf4da2f31..70f2429282b9adc1f91ffb8768e872f0677ea6be 100644 (file)
@@ -544,7 +544,7 @@ pub fn to_err_msg(self) -> String {
     }
 }
 
-impl fmt::String for Fail {
+impl fmt::Display for Fail {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
             ArgumentMissing(ref nm) => {
@@ -893,7 +893,7 @@ fn each_split_within<F>(ss: &str, lim: uint, mut it: F) -> bool where
             (B, Cr, UnderLim) => { B }
             (B, Cr, OverLim)  if (i - last_start + 1) > lim
                             => panic!("word starting with {} longer than limit!",
-                                      &ss[last_start..(i + 1)]),
+                                      &ss[last_start..i + 1]),
             (B, Cr, OverLim)  => {
                 *cont = it(&ss[slice_start..last_end]);
                 slice_start = last_start;