Skip to content

Commit 94c4a47

Browse files
fix: fix SyncLazy rename to LazyLock rust-lang/rust#98165
1 parent 7bdf625 commit 94c4a47

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

crates/compiler/src/converter/v_for.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ mod test {
144144
use super::*;
145145
use crate::cast;
146146
fn to_str(e: Js) -> &str {
147-
let v = cast!(e, Js::Param);
148-
v
147+
cast!(e, Js::Param)
149148
}
150149
fn check_equal(src: &str, expect: (&str, &str, Option<&str>, Option<&str>)) {
151150
let (src, ret) = parse_for_expr(VStr::raw(src)).expect("should parse");

crates/compiler/src/transformer/pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ macro_rules! chain_exit_ext {
209209
}
210210
};
211211
}
212-
impl<'b, T, A, B, Shared> CorePassExt<T, Shared> for Chain<A, B>
212+
impl<T, A, B, Shared> CorePassExt<T, Shared> for Chain<A, B>
213213
where
214214
T: ConvertInfo,
215215
A: CorePassExt<T, Shared>,

crates/compiler/src/util/decode_html.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// sadly current html decode crate requires std::io::Write not fmt
22
use std::fmt::{self, Write};
33
use super::named_chars::NAMED_CHAR_REF;
4-
use std::lazy::SyncLazy;
4+
use std::sync::LazyLock;
55

6-
static MAX_CR_NAME_LEN: SyncLazy<usize> =
7-
SyncLazy::new(|| NAMED_CHAR_REF.keys().copied().map(str::len).max().unwrap());
6+
static MAX_CR_NAME_LEN: LazyLock<usize> =
7+
LazyLock::new(|| NAMED_CHAR_REF.keys().copied().map(str::len).max().unwrap());
88

99
type DecodeResult<'a> = Result<&'a str, fmt::Error>;
1010
pub fn decode_entities<W: Write>(s: &str, mut w: W, as_attr: bool) -> fmt::Result {

crates/dom/src/converter/v_model.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ pub fn convert_v_model<'a>(
2727
DirectiveConvertResult::Dropped | DirectiveConvertResult::Preserve => return base,
2828
DirectiveConvertResult::Converted { value, runtime } => (value, runtime),
2929
};
30-
let runtime_to_use = match compute_v_model_runtime(e, dir) {
30+
match compute_v_model_runtime(e, dir) {
3131
Ok(rt) => {
3232
if matches!(rt, dh::V_MODEL_TEXT | dh::V_MODEL_SELECT) {
3333
check_redundant_value_prop(e, eh);
3434
}
3535
*runtime = Ok(rt);
3636
}
3737
Err(error) => eh.on_error(error),
38-
};
38+
}
3939
// native vmodel doesn't need the `modelValue` props since they are also
4040
// passed to the runtime as `binding.value`. removing it reduces code size.
4141
let props = cast!(value, Js::Props);

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2022-01-01
1+
nightly-2022-06-30

0 commit comments

Comments
 (0)