mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-14 02:31:27 +03:00
Added lifetime annotations to methods in common/hwcodec.rs and common/vram.rs.
This commit is contained in:
@@ -364,7 +364,7 @@ impl HwRamDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn decode(&mut self, data: &[u8]) -> ResultType<Vec<HwRamDecoderImage>> {
|
pub fn decode<'a>(&'a mut self, data: &[u8]) -> ResultType<Vec<HwRamDecoderImage<'a>>> {
|
||||||
match self.decoder.decode(data) {
|
match self.decoder.decode(data) {
|
||||||
Ok(v) => Ok(v.iter().map(|f| HwRamDecoderImage { frame: f }).collect()),
|
Ok(v) => Ok(v.iter().map(|f| HwRamDecoderImage { frame: f }).collect()),
|
||||||
Err(e) => Err(anyhow!(e)),
|
Err(e) => Err(anyhow!(e)),
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ impl VRamDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn decode(&mut self, data: &[u8]) -> ResultType<Vec<VRamDecoderImage>> {
|
pub fn decode<'a>(&'a mut self, data: &[u8]) -> ResultType<Vec<VRamDecoderImage<'a>>> {
|
||||||
match self.decoder.decode(data) {
|
match self.decoder.decode(data) {
|
||||||
Ok(v) => Ok(v.iter().map(|f| VRamDecoderImage { frame: f }).collect()),
|
Ok(v) => Ok(v.iter().map(|f| VRamDecoderImage { frame: f }).collect()),
|
||||||
Err(e) => Err(anyhow!(e)),
|
Err(e) => Err(anyhow!(e)),
|
||||||
|
|||||||
Reference in New Issue
Block a user