Skip to content

Commit a139e0a

Browse files
committed
Format with rustfmt 0.4.2
1 parent c9461e0 commit a139e0a

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

impl/src/lib.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// except according to those terms.
88

99
#![doc(html_root_url = "https://docs.rs/indoc-impl/0.2.3")]
10-
1110
#![cfg_attr(feature = "unstable", feature(proc_macro))]
1211

1312
#[cfg(feature = "unstable")]
@@ -27,7 +26,7 @@ extern crate unindent;
2726
use unindent::*;
2827

2928
use proc_macro2::TokenStream;
30-
use syn::{Lit, LitStr, LitByteStr};
29+
use syn::{Lit, LitByteStr, LitStr};
3130

3231
use std::fmt::Debug;
3332
use std::str::FromStr;
@@ -46,15 +45,19 @@ proc_macro_expr_impl! {
4645
}
4746

4847
fn expand<T, R>(input: &T) -> R
49-
where T: ?Sized + ToString,
50-
R: FromStr,
51-
R::Err: Debug
48+
where
49+
T: ?Sized + ToString,
50+
R: FromStr,
51+
R::Err: Debug,
5252
{
5353
let source = input.to_string().parse::<TokenStream>().unwrap();
5454

5555
let len = source.clone().into_iter().count();
5656
if len != 1 {
57-
panic!("argument must be a single string literal, but got {} arguments", len);
57+
panic!(
58+
"argument must be a single string literal, but got {} arguments",
59+
len
60+
);
5861
}
5962

6063
let lit = match syn::parse2::<Lit>(source) {

src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@
103103
//! ```
104104
105105
#![doc(html_root_url = "https://docs.rs/indoc/0.2.3")]
106-
107106
#![cfg_attr(feature = "unstable", feature(decl_macro, proc_macro, use_extern_macros))]
108-
109107
#![cfg_attr(feature = "cargo-clippy", allow(useless_attribute))]
110108

111109
#[cfg(not(feature = "unstable"))]

unindent/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
//! ```
3333
3434
#![doc(html_root_url = "https://docs.rs/unindent/0.1.2")]
35-
3635
#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
3736

3837
use std::iter::Peekable;
@@ -49,8 +48,7 @@ pub fn unindent(s: &str) -> String {
4948
pub fn unindent_bytes(s: &[u8]) -> Vec<u8> {
5049
// Document may start either on the same line as opening quote or
5150
// on the next line
52-
let ignore_first_line = s.starts_with(b"\n") ||
53-
s.starts_with(b"\r\n");
51+
let ignore_first_line = s.starts_with(b"\n") || s.starts_with(b"\r\n");
5452

5553
// Largest number of spaces that can be removed from every
5654
// non-whitespace-only line after the first

0 commit comments

Comments
 (0)