mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-04 06:35:58 -05:00
fix lifetime elision warnings
This commit is contained in:
@@ -2417,7 +2417,7 @@ impl<C: Clocks + Clone> Database<C> {
|
||||
|
||||
/// Locks the database; the returned reference is the only way to perform (read or write)
|
||||
/// operations.
|
||||
pub fn lock(&self) -> DatabaseGuard<C> {
|
||||
pub fn lock(&self) -> DatabaseGuard<'_, C> {
|
||||
let timer = clock::TimerGuard::new(&self.clocks, acquisition);
|
||||
let db = self.db.as_ref().unwrap().lock();
|
||||
drop(timer);
|
||||
|
||||
@@ -81,12 +81,12 @@ impl Point {
|
||||
}
|
||||
|
||||
/// Returns an iterator over state as of immediately before this point.
|
||||
fn prev(&self) -> PointDataIterator {
|
||||
fn prev(&self) -> PointDataIterator<'_> {
|
||||
PointDataIterator::new(&self.data[0..self.changes_off])
|
||||
}
|
||||
|
||||
/// Returns an iterator over changes in this point.
|
||||
fn changes(&self) -> PointDataIterator {
|
||||
fn changes(&self) -> PointDataIterator<'_> {
|
||||
PointDataIterator::new(&self.data[self.changes_off..])
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn default_pixel_aspect_ratio(width: u16, height: u16) -> (u16, u16) {
|
||||
(1, 1)
|
||||
}
|
||||
|
||||
fn parse(data: &[u8]) -> Result<AvcDecoderConfigurationRecord, Error> {
|
||||
fn parse(data: &[u8]) -> Result<AvcDecoderConfigurationRecord<'_>, Error> {
|
||||
if data.len() < 94 || &data[4..8] != b"avc1" || &data[90..94] != b"avcC" {
|
||||
bail!(
|
||||
DataLoss,
|
||||
|
||||
Reference in New Issue
Block a user