clone outside

This commit is contained in:
yggverse 2025-08-03 14:44:47 +03:00
parent 644b09c04b
commit 157f13c984
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ async fn main() -> Result<()> {
)?;
let trackers = Trackers::init(&config.tracker)?;
let session = librqbit::Session::new_with_opts(
preload.root(),
preload.root().clone(),
SessionOptions {
bind_device_name: config.bind,
listen: None,

View file

@ -37,8 +37,8 @@ impl Preload {
Ok(p)
}
pub fn root(&self) -> PathBuf {
self.root.clone()
pub fn root(&self) -> &PathBuf {
&self.root
}
pub fn bytes(&self, relative: &PathBuf) -> Result<Vec<u8>> {