refactor: Cleaning up downloads playing and pausing

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-09 19:57:53 +11:00
parent 55b7921ee6
commit 2c7b5fb47d
9 changed files with 60 additions and 61 deletions

View File

@ -3,7 +3,7 @@ use url::Url;
#[derive(Serialize, Deserialize, Debug)]
pub struct P2PManager {
peers: Vec<Peer>
peers: Vec<Peer>,
}
#[derive(Serialize, Deserialize, Debug)]
@ -15,12 +15,12 @@ pub struct Peer {
impl Peer {
pub fn get_current_endpoint(&self) -> Url {
return self.endpoints[self.current_endpoint].clone();
self.endpoints[self.current_endpoint].clone()
}
pub fn connect(&mut self, ) {
pub fn connect(&mut self) {
todo!()
}
pub fn disconnect(&mut self) {
todo!()
}
}
}