mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:51:30 +00:00
Upgrade to Rust 1.79 (#11875)
This commit is contained in:
parent
355d26f05c
commit
1f654ee729
6 changed files with 10 additions and 10 deletions
|
@ -70,7 +70,7 @@ imperative = { version = "1.0.4" }
|
|||
indexmap = { version = "2.2.6" }
|
||||
indicatif = { version = "0.17.8" }
|
||||
indoc = { version = "2.0.4" }
|
||||
insta = { version = "1.35.1", feature = ["filters", "glob"] }
|
||||
insta = { version = "1.35.1" }
|
||||
insta-cmd = { version = "0.6.0" }
|
||||
is-macro = { version = "0.3.5" }
|
||||
is-wsl = { version = "0.4.0" }
|
||||
|
|
|
@ -932,7 +932,7 @@ mod tests {
|
|||
// Luckily this crate will fail to build if this file isn't available at build time.
|
||||
const TYPESHED_ZIP_BYTES: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/zipped_typeshed.zip"));
|
||||
assert!(!TYPESHED_ZIP_BYTES.is_empty());
|
||||
|
||||
let mut typeshed_zip_archive = ZipArchive::new(Cursor::new(TYPESHED_ZIP_BYTES))?;
|
||||
|
||||
let path_to_functools = Path::new("stdlib").join("functools.pyi");
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
use crate::registry::Rule;
|
||||
use ruff_macros::CacheKey;
|
||||
use std::fmt::{Debug, Display, Formatter};
|
||||
use std::iter::FusedIterator;
|
||||
|
||||
use ruff_macros::CacheKey;
|
||||
|
||||
use crate::registry::Rule;
|
||||
|
||||
const RULESET_SIZE: usize = 14;
|
||||
|
||||
/// A set of [`Rule`]s.
|
||||
|
@ -367,7 +369,7 @@ impl Iterator for RuleSetIterator {
|
|||
let rule_value = self.index * RuleSet::SLICE_BITS + bit;
|
||||
// SAFETY: RuleSet guarantees that only valid rules are stored in the set.
|
||||
#[allow(unsafe_code)]
|
||||
return Some(unsafe { std::mem::transmute(rule_value) });
|
||||
return Some(unsafe { std::mem::transmute::<u16, Rule>(rule_value) });
|
||||
}
|
||||
|
||||
self.index += 1;
|
||||
|
@ -387,9 +389,10 @@ impl FusedIterator for RuleSetIterator {}
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::registry::{Rule, RuleSet};
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::registry::{Rule, RuleSet};
|
||||
|
||||
/// Tests that the set can contain all rules
|
||||
#[test]
|
||||
fn test_all_rules() {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use std::usize;
|
||||
|
||||
use ruff_formatter::{format_args, write, FormatRuleWithOptions};
|
||||
use ruff_python_ast::Parameters;
|
||||
use ruff_python_ast::{AnyNodeRef, AstNode};
|
||||
|
|
|
@ -5,7 +5,6 @@ use {
|
|||
fmt, iter,
|
||||
num::TryFromIntError,
|
||||
ops::{Add, AddAssign, Sub, SubAssign},
|
||||
u32,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "1.78"
|
||||
channel = "1.79"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue