Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Rust 1.65.0 #1306

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/fj/src/abi/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl<'a> From<&'a &dyn crate::models::Context> for Context<'a> {
let ctx = &*(user_data as *const &dyn crate::models::Context);

match std::panic::catch_unwind(AssertUnwindSafe(|| {
ctx.get_argument(&*name)
ctx.get_argument(&name)
})) {
Ok(Some(arg)) => StringSlice::from_str(arg),
Ok(None) => StringSlice::from_str(""),
Expand Down
4 changes: 2 additions & 2 deletions crates/fj/src/abi/ffi_safe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl Deref for String {
fn deref(&self) -> &Self::Target {
// Safety: The only way to create a FfiSafeString is from a valid Rust
// string, so we can skip the UTF-8 checks.
unsafe { std::str::from_utf8_unchecked(&*self.0) }
unsafe { std::str::from_utf8_unchecked(&self.0) }
}
}

Expand Down Expand Up @@ -296,7 +296,7 @@ impl Deref for StringSlice {

fn deref(&self) -> &Self::Target {
// Safety: the only way you can construct a StringSlice is via a string.
unsafe { std::str::from_utf8_unchecked(&*self.0) }
unsafe { std::str::from_utf8_unchecked(&self.0) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/fj/src/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn on_panic(payload: Box<dyn Any + Send>) -> ! {
if let Some(s) = payload.downcast_ref::<std::string::String>() {
s.as_str()
} else if let Some(s) = payload.downcast_ref::<&str>() {
*s
s
} else {
"A panic occurred"
};
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.64.0"
channel = "1.65.0"
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]