Remove String::rewrite()
This commit is contained in:
parent
2b6e50436c
commit
dde0cdabe0
1 changed files with 1 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ use syntax::ast::{self, Attribute, MetaItem, MetaItemKind, NestedMetaItem, Neste
|
|||
Path, Visibility};
|
||||
use syntax::codemap::{BytePos, Span, NO_EXPANSION};
|
||||
|
||||
use rewrite::{Rewrite, RewriteContext};
|
||||
use rewrite::RewriteContext;
|
||||
use shape::Shape;
|
||||
|
||||
// When we get scoped annotations, we should have rustfmt::skip.
|
||||
|
|
@ -425,12 +425,6 @@ pub fn wrap_str<S: AsRef<str>>(s: S, max_width: usize, shape: Shape) -> Option<S
|
|||
Some(s)
|
||||
}
|
||||
|
||||
impl Rewrite for String {
|
||||
fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
|
||||
wrap_str(self, context.config.max_width(), shape).map(ToOwned::to_owned)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn colon_spaces(before: bool, after: bool) -> &'static str {
|
||||
match (before, after) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue