mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Bump Rust to 1.81 for latest CVE
This commit is contained in:
parent
ba18a2c6d9
commit
5335d748cf
7 changed files with 8 additions and 9 deletions
|
@ -190,7 +190,7 @@ impl BuildAction for PythonFormat<'_> {
|
||||||
pub fn python_format(build: &mut Build, group: &str, inputs: BuildInput) -> Result<()> {
|
pub fn python_format(build: &mut Build, group: &str, inputs: BuildInput) -> Result<()> {
|
||||||
let isort_ini = &inputs![".isort.cfg"];
|
let isort_ini = &inputs![".isort.cfg"];
|
||||||
build.add_action(
|
build.add_action(
|
||||||
&format!("check:format:python:{group}"),
|
format!("check:format:python:{group}"),
|
||||||
PythonFormat {
|
PythonFormat {
|
||||||
inputs: &inputs,
|
inputs: &inputs,
|
||||||
check_only: true,
|
check_only: true,
|
||||||
|
@ -199,7 +199,7 @@ pub fn python_format(build: &mut Build, group: &str, inputs: BuildInput) -> Resu
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
build.add_action(
|
build.add_action(
|
||||||
&format!("format:python:{group}"),
|
format!("format:python:{group}"),
|
||||||
PythonFormat {
|
PythonFormat {
|
||||||
inputs: &inputs,
|
inputs: &inputs,
|
||||||
check_only: false,
|
check_only: false,
|
||||||
|
|
|
@ -46,7 +46,7 @@ pub fn build_bundle_binary() {
|
||||||
.join("Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic");
|
.join("Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic");
|
||||||
if ld_classic.exists() {
|
if ld_classic.exists() {
|
||||||
// work around XCode 15's default linker not supporting macOS 10.15-12.
|
// work around XCode 15's default linker not supporting macOS 10.15-12.
|
||||||
command.env("RUSTFLAGS", &format!("-Clink-arg=-fuse-ld={ld_classic}"));
|
command.env("RUSTFLAGS", format!("-Clink-arg=-fuse-ld={ld_classic}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
run_command(&mut command);
|
run_command(&mut command);
|
||||||
|
|
|
@ -464,7 +464,7 @@ pub struct ResourcesForJavascript {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn without_unicode_isolation(s: &str) -> String {
|
pub fn without_unicode_isolation(s: &str) -> String {
|
||||||
s.replace(|c| c == '\u{2068}' || c == '\u{2069}', "")
|
s.replace(['\u{2068}', '\u{2069}'], "")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -131,8 +131,7 @@ impl Card {
|
||||||
} else {
|
} else {
|
||||||
self.due_time(timing).map(|due| {
|
self.due_time(timing).map(|due| {
|
||||||
due.adding_secs(-86_400 * self.interval as i64)
|
due.adding_secs(-86_400 * self.interval as i64)
|
||||||
.elapsed_secs()
|
.elapsed_secs() as u32
|
||||||
.max(0) as u32
|
|
||||||
/ 86_400
|
/ 86_400
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,7 +394,7 @@ impl Collection {
|
||||||
let qfmt = basic.templates[0].config.q_format.clone();
|
let qfmt = basic.templates[0].config.q_format.clone();
|
||||||
let afmt = basic.templates[0].config.a_format.clone();
|
let afmt = basic.templates[0].config.a_format.clone();
|
||||||
for n in 0..extra_cards_required {
|
for n in 0..extra_cards_required {
|
||||||
basic.add_template(&format!("Card {}", n + 2), &qfmt, &afmt);
|
basic.add_template(format!("Card {}", n + 2), &qfmt, &afmt);
|
||||||
}
|
}
|
||||||
self.add_notetype(&mut basic, true)?;
|
self.add_notetype(&mut basic, true)?;
|
||||||
Ok(Arc::new(basic))
|
Ok(Arc::new(basic))
|
||||||
|
|
|
@ -223,7 +223,7 @@ impl SimpleServer {
|
||||||
let config = envy::prefixed("SYNC_")
|
let config = envy::prefixed("SYNC_")
|
||||||
.from_env::<SyncServerConfig>()
|
.from_env::<SyncServerConfig>()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
std::net::TcpStream::connect(&format!("{}:{}", config.host, config.port)).is_ok()
|
std::net::TcpStream::connect(format!("{}:{}", config.host, config.port)).is_ok()
|
||||||
}
|
}
|
||||||
pub fn new(base_folder: &Path) -> error::Result<Self, Whatever> {
|
pub fn new(base_folder: &Path) -> error::Result<Self, Whatever> {
|
||||||
let inner = SimpleServerInner::new_from_env(base_folder)?;
|
let inner = SimpleServerInner::new_from_env(base_folder)?;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
# older versions may fail to compile; newer versions may fail the clippy tests
|
# older versions may fail to compile; newer versions may fail the clippy tests
|
||||||
channel = "1.80.1"
|
channel = "1.81.0"
|
||||||
|
|
Loading…
Reference in a new issue