build cleanly with nightly Rust 2021-03-14+

The CI nightly builds had been broken with the following error:

```
error: custom inner attributes are unstable
  --> /home/runner/work/moonfire-nvr/moonfire-nvr/server/target/debug/build/moonfire-db-415ce696a754c614/out/schema.rs:10:4
   |
10 | #![rustfmt::skip]
   |    ^^^^^^^^^^^^^
   |
   = note: `#[deny(soft_unstable)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
```

I'd thought this was by mistake given that #[rustfmt::skip] is still
advertised on rustfmt's github page, but maybe not. Looks like
rust-protobuf's newest version uses
`#![cfg_attr(rustfmt, rustfmt::skip)]` to avoid this error.

Also fix a warning on nightly about an extraneous semicolon.
This commit is contained in:
Scott Lamb 2021-03-24 08:01:48 -07:00
parent abcd650304
commit 6fd4f8975b
3 changed files with 8 additions and 4 deletions

View File

@ -6,6 +6,10 @@ changes, see Git history.
Each release is tagged in Git and on the Docker repository
[`scottlamb/moonfire-nvr`](https://hub.docker.com/r/scottlamb/moonfire-nvr).
## `v0.6.3` (in progress)
* Compile fix for nightly rust 2021-03-14 and beyond.
## `v0.6.2`
* Fix panics when a stream's PTS has extreme jumps

6
server/Cargo.lock generated
View File

@ -1629,12 +1629,12 @@ dependencies = [
[[package]]
name = "protobuf"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#5f3ed259acf9ae42014e4e49f7c4d62917685584"
source = "git+https://github.com/stepancheg/rust-protobuf#c27743ae4ce421f5d9a61ef0d1885eface278d6c"
[[package]]
name = "protobuf-codegen"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#5f3ed259acf9ae42014e4e49f7c4d62917685584"
source = "git+https://github.com/stepancheg/rust-protobuf#c27743ae4ce421f5d9a61ef0d1885eface278d6c"
dependencies = [
"protobuf",
]
@ -1642,7 +1642,7 @@ dependencies = [
[[package]]
name = "protobuf-codegen-pure"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#5f3ed259acf9ae42014e4e49f7c4d62917685584"
source = "git+https://github.com/stepancheg/rust-protobuf#c27743ae4ce421f5d9a61ef0d1885eface278d6c"
dependencies = [
"protobuf",
"protobuf-codegen",

View File

@ -1336,7 +1336,7 @@ impl FileBuilder {
struct Entry {
segment_duration: u64,
media_time: u64,
};
}
let mut flushed: Vec<Entry> = Vec::new();
let mut unflushed: Entry = Default::default();
let mut cur_media_time: u64 = 0;