media_catalog: use stream_position

Fixes the following clippy lint:

```
warning: using `SeekFrom::Current` to start from current position
   --> src/tape/media_catalog.rs:798:23
    |
798 |             let pos = file.seek(SeekFrom::Current(0))?; // get current pos
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `file.stream_position()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current
    = note: `#[warn(clippy::seek_from_current)]` on by default
```

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2024-02-12 14:17:29 +01:00 committed by Fabian Grünbichler
parent 2224b3900d
commit 7b61e06860

View File

@ -1,6 +1,6 @@
use std::collections::{HashMap, HashSet};
use std::fs::File;
use std::io::{BufReader, Read, Seek, SeekFrom, Write};
use std::io::{BufReader, Read, Seek, Write};
use std::os::unix::io::AsRawFd;
use std::path::{Path, PathBuf};
@ -795,7 +795,7 @@ impl MediaCatalog {
let mut media_set_uuid = None;
loop {
let pos = file.seek(SeekFrom::Current(0))?; // get current pos
let pos = file.stream_position()?; // get current pos
if pos == 0 {
// read/check magic number