Use nested_shape for indenting types of lazy_static
This commit is contained in:
parent
61919022dd
commit
b3fa50db73
@ -916,7 +916,7 @@ fn format_lazy_static(context: &RewriteContext, shape: Shape, ts: &TokenStream)
|
||||
"{}static ref {}: {} =",
|
||||
vis,
|
||||
id,
|
||||
ty.rewrite(context, shape)?
|
||||
ty.rewrite(context, nested_shape)?
|
||||
));
|
||||
result.push_str(&::expr::rewrite_assign_rhs(
|
||||
context,
|
||||
|
@ -35,3 +35,11 @@ let ptr = :: remacs_sys :: xmalloc (
|
||||
remacs_sys :: Lisp_Subr ; :: std :: ptr :: copy_nonoverlapping (
|
||||
& subr , ptr , 1 ) ; :: std :: mem :: forget ( subr ) ; :: lisp :: ExternalPtr
|
||||
:: new ( ptr ) } } ; }
|
||||
|
||||
|
||||
lazy_static! {
|
||||
static ref FOO: HashMap<String,
|
||||
(&'static str,
|
||||
fn(Foo) -> Result<Box<Bar>, Either<FooError, BarError>>
|
||||
),> = HashMap::new();
|
||||
}
|
||||
|
@ -37,3 +37,13 @@ lazy_static! {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref FOO: HashMap<
|
||||
String,
|
||||
(
|
||||
&'static str,
|
||||
fn(Foo) -> Result<Box<Bar>, Either<FooError, BarError>>
|
||||
),
|
||||
> = HashMap::new();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user