Skip to content

Commit 449809f

Browse files
committed
Misc rust formatting
1 parent 3edc540 commit 449809f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

rust/examples/workflow.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ fn example_activity(analysis_context: &AnalysisContext) {
2929
llil_instr.visit_tree(&mut |expr, info| {
3030
if let ExprInfo::Const(_op) = info {
3131
// Replace all consts with 0x1337.
32-
println!(
33-
"Replacing llil expression @ 0x{:x} : {}",
34-
instr, expr.index
35-
);
32+
println!("Replacing llil expression @ 0x{:x} : {}", instr, expr.index);
3633
unsafe {
3734
llil.replace_expression(expr.index, llil.const_int(4, 0x1337))
3835
};

rust/src/hlil/instruction.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,9 @@ impl HighLevelILInstruction {
754754
// TODO: Replace with a From<u32> for RegisterValueType.
755755
// TODO: We might also want to change the type of `op.constant_data_kind`
756756
// TODO: To RegisterValueType and do the conversion when creating instruction.
757-
state: unsafe { std::mem::transmute::<u32, BNRegisterValueType>(op.constant_data_kind) },
757+
state: unsafe {
758+
std::mem::transmute::<u32, BNRegisterValueType>(op.constant_data_kind)
759+
},
758760
value: op.constant_data_value,
759761
offset: 0,
760762
size: op.size,

rust/src/mlil/instruction.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@ impl MediumLevelILInstruction {
753753
// TODO: Replace with a From<u32> for RegisterValueType.
754754
// TODO: We might also want to change the type of `op.constant_data_kind`
755755
// TODO: To RegisterValueType and do the conversion when creating instruction.
756-
state: unsafe { std::mem::transmute::<u32, BNRegisterValueType>(op.constant_data_kind) },
756+
state: unsafe {
757+
std::mem::transmute::<u32, BNRegisterValueType>(op.constant_data_kind)
758+
},
757759
value: op.constant_data_value,
758760
offset: 0,
759761
size: op.size,

rust/src/typecontainer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ impl TypeContainer {
351351

352352
/// Parse an entire block of source into types, variables, and functions, with
353353
/// knowledge of the types in the Type Container.
354-
///
354+
///
355355
/// * `source` - Source code to parse
356356
/// * `file_name` - Name of the file containing the source (optional: exists on disk)
357357
/// * `options` - String arguments to pass as options, e.g. command line arguments

0 commit comments

Comments
 (0)