Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuang committed Mar 9, 2025
1 parent 352440c commit 6b503e1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,8 @@ fn rewrite_segment(
Ok(s) => s,
Err(_) => {
let mut shape = shape;
// dbg!(&shape);
shape.indent = shape.indent.block_indent(context.config).block_only();
// dbg!(&result, shape);
result.insert_str(0, &shape.indent.to_string_with_newline(context.config));
// dbg!(&result);
shape
}
}
Expand Down
10 changes: 10 additions & 0 deletions tests/source/long_type_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ fn test() {
::Long =
Default::default();
}

fn test2() {
let offenders = current_validators
.into_iter()
.enumerate()
.filter_map(|(_, id)|
<<Runtime as pallet_im_online::Config>::ValidatorSet as ValidatorSetWithIdentification<
sp_runtime::AccountId32>>::IdentificationOf::convert(id.clone()).map(|full_id| (id, full_id)))
.collect::<Vec<IdentificationTuple<Runtime>>>();
}
10 changes: 10 additions & 0 deletions tests/target/long_type_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ fn test() {
long_type_path::long_type_path::long_type_path::long_type_path::long_type_path::Long =
Default::default();
}

fn test2() {
let offenders = current_validators
.into_iter()
.enumerate()
.filter_map(|(_, id)|
<<Runtime as pallet_im_online::Config>::ValidatorSet as ValidatorSetWithIdentification<
sp_runtime::AccountId32>>::IdentificationOf::convert(id.clone()).map(|full_id| (id, full_id)))
.collect::<Vec<IdentificationTuple<Runtime>>>();
}

0 comments on commit 6b503e1

Please sign in to comment.