Skip to content

Commit

Permalink
fix(types) Fix issues with no_std
Browse files Browse the repository at this point in the history
`rustc` says:

```
error[E0433]: failed to resolve. Did you mean `lib::std`?
  --> /…/src/types.rs:38:27
   |
38 |   fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
   |                           ^^^ Did you mean `lib::std`?

error[E0433]: failed to resolve. Did you mean `lib::std`?
  --> /…/src/types.rs:38:53
   |
38 |   fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
   |                                                     ^^^ Did you mean `lib::std`?
```

This patch fixes the issue.
  • Loading branch information
Hywan authored and Geal committed Apr 11, 2018
1 parent 727006b commit 9b794ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use lib::std::ops::{Deref, Range, RangeFrom, RangeFull, RangeTo};
use lib::std::slice::Iter;
use lib::std::str::{self, CharIndices, Chars, FromStr};
use lib::std::convert::From;
use lib::std::fmt::Display;
use lib::std::fmt::{Display, Formatter, Result};
#[cfg(feature = "alloc")]
use lib::std::string::String;

Expand All @@ -35,7 +35,7 @@ impl<'a, 'b> From<&'b &'a str> for CompleteStr<'a> {
}

impl<'a> Display for CompleteStr<'a> {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> Result {
self.0.fmt(f)
}
}
Expand Down

0 comments on commit 9b794ff

Please sign in to comment.