Skip to content

Commit

Permalink
apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed Aug 6, 2023
1 parent 49d807f commit e7de1dd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion appimage_builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn main() -> anyhow::Result<()> {
}

let appimage_path = Path::new(application_name).with_extension("AppImage");
generate_appimage(&appimage_path, &appdir_path)?;
generate_appimage(appimage_path, &appdir_path)?;

Ok(())
}
2 changes: 1 addition & 1 deletion src/osd/dji/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl Reader {
fn keep_position_do<F, X, E>(&mut self, f: F) -> Result<X, E>
where F: FnOnce(&mut Self) -> Result<X, E>
{
let starting_position = self.file.seek(SeekFrom::Current(0)).unwrap();
let starting_position = self.file.stream_position().unwrap();
let return_value = f(self);
self.file.seek(SeekFrom::Start(starting_position)).unwrap();
return_value
Expand Down
2 changes: 1 addition & 1 deletion src/osd/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl super::file::Frame {
let y = osd_coordinates.y as u32 * tiles_height;
if x < frame.width() && y < frame.height() {
frame.copy_from(
&tile_image,
tile_image,
osd_coordinates.x as u32 * tiles_width,
osd_coordinates.y as u32 * tiles_height
).unwrap();
Expand Down
6 changes: 1 addition & 5 deletions src/osd/overlay/scaling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ use derive_more::From;
use getset::{CopyGetters, Getters};
use thiserror::Error;

use super::{
margins::{
Margins,
},
};
use super::margins::Margins;

use crate::video::{
resolution::{
Expand Down
2 changes: 1 addition & 1 deletion src/osd/wsa/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl Reader {
fn keep_position_do<F, X, E>(&mut self, f: F) -> Result<X, E>
where F: FnOnce(&mut Self) -> Result<X, E>
{
let starting_position = self.file.seek(SeekFrom::Current(0)).unwrap();
let starting_position = self.file.stream_position().unwrap();
let return_value = f(self);
self.file.seek(SeekFrom::Start(starting_position)).unwrap();
return_value
Expand Down

0 comments on commit e7de1dd

Please sign in to comment.