Skip to content

Commit

Permalink
chore: Rust v1.76.0 (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Mar 8, 2024
1 parent 265b2fb commit c72675e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -38,6 +38,7 @@ rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
unnecessary_safety_comment = "warn"
undocumented_unsafe_blocks = "warn"
infinite_loop = "warn"
# I want to write the best Rust code so pedantic is enabled.
# We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
pedantic = { level = "warn", priority = -1 }
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_cli/src/command/lint.rs
Expand Up @@ -66,6 +66,7 @@ pub struct LintOptions {
pub paths: Vec<PathBuf>,
}

#[allow(clippy::ptr_arg)]
fn validate_paths(paths: &Vec<PathBuf>) -> bool {
if paths.is_empty() {
true
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_codegen/src/sourcemap_builder.rs
Expand Up @@ -57,7 +57,7 @@ impl SourcemapBuilder {
self.enable_sourcemap.then(|| self.sourcemap_builder.into_sourcemap())
}

pub fn add_source_mapping(&mut self, output: &Vec<u8>, position: u32, name: Option<&str>) {
pub fn add_source_mapping(&mut self, output: &[u8], position: u32, name: Option<&str>) {
if self.enable_sourcemap {
if matches!(self.last_position, Some(last_position) if last_position >= position) {
return;
Expand Down Expand Up @@ -94,7 +94,7 @@ impl SourcemapBuilder {
}

#[allow(clippy::cast_possible_truncation)]
fn update_generated_line_and_column(&mut self, output: &Vec<u8>) {
fn update_generated_line_and_column(&mut self, output: &[u8]) {
let remaining = &output[self.last_generated_update..];

// Find last line break
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.75.0"
channel = "1.76.0"
profile = "default"

0 comments on commit c72675e

Please sign in to comment.