mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-26 07:05:56 -05:00
get rid of deprecated mem::uninitialized()
This requires a Rust version bump, as MaybeUninit was introduced in Rust 1.36.
This commit is contained in:
parent
2bd8963961
commit
72d301af6e
@ -23,7 +23,7 @@ matrix:
|
||||
script:
|
||||
- ci/script-rust.sh
|
||||
- language: rust
|
||||
rust: 1.34.0
|
||||
rust: 1.36.0
|
||||
script:
|
||||
- ci/script-rust.sh
|
||||
- language: node_js
|
||||
|
@ -75,8 +75,9 @@ pub struct RealClocks {}
|
||||
impl RealClocks {
|
||||
fn get(&self, clock: libc::clockid_t) -> Timespec {
|
||||
unsafe {
|
||||
let mut ts = mem::uninitialized();
|
||||
assert_eq!(0, libc::clock_gettime(clock, &mut ts));
|
||||
let mut ts = mem::MaybeUninit::uninit();
|
||||
assert_eq!(0, libc::clock_gettime(clock, ts.as_mut_ptr()));
|
||||
let ts = ts.assume_init();
|
||||
Timespec::new(ts.tv_sec as i64, ts.tv_nsec as i32)
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ $ sudo apt-get install \
|
||||
tzdata
|
||||
```
|
||||
|
||||
Next, you need Rust 1.34+ and Cargo. The easiest way to install them is by
|
||||
Next, you need Rust 1.36+ and Cargo. The easiest way to install them is by
|
||||
following the instructions at [rustup.rs](https://www.rustup.rs/).
|
||||
|
||||
Finally, building the UI requires [yarn](https://yarnpkg.com/en/).
|
||||
|
@ -40,7 +40,7 @@ fi
|
||||
NODE_MIN_VERSION="8"
|
||||
YARN_MIN_VERSION="1.0"
|
||||
CARGO_MIN_VERSION="0.2"
|
||||
RUSTC_MIN_VERSION="1.34"
|
||||
RUSTC_MIN_VERSION="1.36"
|
||||
|
||||
normalizeDirPath()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user