Skip to content

Commit b582e6e

Browse files
abhillmanjamesyoungman
authored andcommitted
Resolve clippy warnings
``` [nix-shell:~/Development/TX-2-simulator]$ cargo clippy --workspace Compiling psm v0.1.26 Checking stacker v0.1.21 Checking chumsky v1.0.0-alpha.8 Checking assembler v0.1.0 (/home/aryehh/Development/TX-2-simulator/assembler) warning: the following explicit lifetimes could be elided: 's --> assembler/src/asmlib/ast.rs:1831:38 | 1831 | pub(crate) fn build_binary_block<'s, R: RcUpdater>( | ^^ ... 1841 | body: &Source<'s>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 1831 ~ pub(crate) fn build_binary_block<R: RcUpdater>( 1832 | &self, ... 1840 | final_symbols: &mut FinalSymbolTable, 1841 ~ body: &Source<'_>, | warning: the following explicit lifetimes could be elided: 's --> assembler/src/asmlib/symtab.rs:443:57 | 443 | pub(super) fn record_undefined_symbol_or_return_failure<'s>( | ^^ 444 | source_file_body: &Source<'s>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 443 ~ pub(super) fn record_undefined_symbol_or_return_failure( 444 ~ source_file_body: &Source<'_>, | warning: `assembler` (lib) generated 2 warnings (run `cargo clippy --fix --lib -p assembler` to apply 2 suggestions) Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.82s ```
1 parent 03de447 commit b582e6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

assembler/src/asmlib/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ impl InstructionSequence {
18281828
}
18291829

18301830
#[allow(clippy::too_many_arguments)]
1831-
pub(crate) fn build_binary_block<'s, R: RcUpdater>(
1831+
pub(crate) fn build_binary_block<R: RcUpdater>(
18321832
&self,
18331833
location: Address,
18341834
start_offset: Unsigned18Bit,
@@ -1838,7 +1838,7 @@ impl InstructionSequence {
18381838
index_register_assigner: &mut IndexRegisterAssigner,
18391839
rc_allocator: &mut R,
18401840
final_symbols: &mut FinalSymbolTable,
1841-
body: &Source<'s>,
1841+
body: &Source<'_>,
18421842
listing: &mut Listing,
18431843
bad_symbol_definitions: &mut BTreeMap<SymbolName, ProgramError>,
18441844
) -> Result<Vec<Unsigned36Bit>, AssemblerFailure> {

assembler/src/asmlib/symtab.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ pub(super) fn assign_default_rc_word_tags<R: RcAllocator>(
440440
Ok(())
441441
}
442442

443-
pub(super) fn record_undefined_symbol_or_return_failure<'s>(
444-
source_file_body: &Source<'s>,
443+
pub(super) fn record_undefined_symbol_or_return_failure(
444+
source_file_body: &Source<'_>,
445445
e: SymbolLookupFailure,
446446
undefined_symbols: &mut BTreeMap<SymbolName, ProgramError>,
447447
) -> Result<(), AssemblerFailure> {

0 commit comments

Comments
 (0)