Auto merge of #494 - doggo-ninja:extremely-minor-fixes, r=jdm

Extremely minor fixes

Only doing this to remedy a very minor annoyance of mine. These are not major (or even very helpful) changes by any measure.

- Removes an unneeded `use` statement
- Fixes a [deprecated](https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html) use of `panic!`
This commit is contained in:
bors-servo 2022-03-27 23:16:50 -04:00 committed by GitHub
commit c8ae2aa61e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,6 @@ use pathfinder_resources::ResourceLoader;
use pathfinder_resources::fs::FilesystemResourceLoader; use pathfinder_resources::fs::FilesystemResourceLoader;
use std::cell::Cell; use std::cell::Cell;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::mem;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::Mutex; use std::sync::Mutex;
use surfman::{SurfaceAccess, SurfaceType, declare_surfman}; use surfman::{SurfaceAccess, SurfaceType, declare_surfman};
@ -163,7 +162,7 @@ impl Window for WindowImpl {
fn metal_device(&self) -> metal::Device { fn metal_device(&self) -> metal::Device {
// FIXME(pcwalton): Remove once `surfman` upgrades `metal-rs` version. // FIXME(pcwalton): Remove once `surfman` upgrades `metal-rs` version.
unsafe { unsafe {
mem::transmute(self.metal_device.0.clone()) std::mem::transmute(self.metal_device.0.clone())
} }
} }

View File

@ -36,7 +36,7 @@ fn main() {
Ok(bytes) => { Ok(bytes) => {
swf_bytes = bytes; swf_bytes = bytes;
}, },
Err(e) => panic!(e) Err(e) => panic!("{}", e)
} }
} else { } else {
// NOTE(jon): This is a version of the ghostscript tiger graphic flattened to a single // NOTE(jon): This is a version of the ghostscript tiger graphic flattened to a single