Sweep the pinned toolchain to Rust 1.97
The Windows UI needs current winsafe, whose real minimum is 1.89 (its manifest under-declares 1.87 while it uses NonNull::from_ref). Rather than stop at the minimum, this goes to current stable and fixes what that costs. The counter-intuitive result: 1.97 is CHEAPER than 1.89. libfreemkv had 54 clippy errors at 1.89 and 6 at 1.97, because clippy tightened the noisy collapsible_if lint in between. Stopping at the minimum would have been the most expensive choice available. Roughly 47 lints across the eight repos, the large majority auto-fixed: libfreemkv 6, freemkv-engine 14, bdemu 8, freemkv-keysources 7, autorip 6, freemkv-unlock 3, freemkv-i18n 3. The hand-fixed ones are a descending sort to sort_by_key(Reverse), four manual checked-division sites, a loop counter replaced by enumerate, and a loop whose first let-else became a while-let. Worth recording for whoever bumps next: clippy is MSRV-AWARE. Those 54 lints only appear once the crate DECLARES 1.89 or later, because let-chains become available. A bare `cargo +1.89 clippy` against a manifest still pinned at 1.87 reports clean and is meaningless — gate with the real precommit script, which is also the only thing that covers build scripts. The pin still sits below the Mac default, so it keeps doing its job: catching lint drift locally before CI sees it.
This commit is contained in:
+18
-19
@@ -307,11 +307,10 @@ impl HevcParser {
|
||||
};
|
||||
let rbsp = strip_emulation_prevention(raw);
|
||||
let mut i = 0usize;
|
||||
loop {
|
||||
// payloadType: sum of 0xFF run + final byte.
|
||||
let Some(payload_type) = read_sei_ff_value(&rbsp, &mut i) else {
|
||||
break;
|
||||
};
|
||||
// payloadType: sum of 0xFF run + final byte. Exhausting the RBSP ends the
|
||||
// walk; the remaining `let ... else break` arms below handle a TRUNCATED
|
||||
// message, which is a different condition from a clean end.
|
||||
while let Some(payload_type) = read_sei_ff_value(&rbsp, &mut i) {
|
||||
// payloadSize: same ff-extension coding.
|
||||
let Some(payload_size) = read_sei_ff_value(&rbsp, &mut i) else {
|
||||
break;
|
||||
@@ -504,11 +503,11 @@ impl CodecParser for HevcParser {
|
||||
// 33-bit counter wrapped: add another period and re-check, rather
|
||||
// than treat the wrap as a backward clip reset.
|
||||
let mut unwrapped = raw_pts + self.pts_wrap_offset;
|
||||
if let Some(high) = self.high_pts {
|
||||
if high - unwrapped > PTS_WRAP_PERIOD / 2 {
|
||||
self.pts_wrap_offset += PTS_WRAP_PERIOD;
|
||||
unwrapped += PTS_WRAP_PERIOD;
|
||||
}
|
||||
if let Some(high) = self.high_pts
|
||||
&& high - unwrapped > PTS_WRAP_PERIOD / 2
|
||||
{
|
||||
self.pts_wrap_offset += PTS_WRAP_PERIOD;
|
||||
unwrapped += PTS_WRAP_PERIOD;
|
||||
}
|
||||
match self.high_pts {
|
||||
Some(high) if unwrapped < high - BACKSTEP_TICKS => {
|
||||
@@ -564,18 +563,18 @@ impl CodecParser for HevcParser {
|
||||
// `num_extra_slice_header_bits` — and thus the bit offset to
|
||||
// `slice_type` — is EXACT. With no PPS we decline rather than
|
||||
// guess, leaving coding `None` (honestly absent).
|
||||
if coding_type.is_none() && nal_type <= NAL_VCL_MAX {
|
||||
if let Some(num_extra) = self
|
||||
if coding_type.is_none()
|
||||
&& nal_type <= NAL_VCL_MAX
|
||||
&& let Some(num_extra) = self
|
||||
.cur_pps
|
||||
.as_deref()
|
||||
.and_then(hevc_num_extra_slice_header_bits)
|
||||
{
|
||||
coding_type = hevc_first_slice_coding_type(
|
||||
&data[nal_start..end],
|
||||
nal_type,
|
||||
num_extra,
|
||||
);
|
||||
}
|
||||
{
|
||||
coding_type = hevc_first_slice_coding_type(
|
||||
&data[nal_start..end],
|
||||
nal_type,
|
||||
num_extra,
|
||||
);
|
||||
}
|
||||
|
||||
match nal_type {
|
||||
|
||||
Reference in New Issue
Block a user