Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 29 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"
description = "Core BitTorrent client library for the rtbit torrent client"
license = "MIT"
repository = "http://100.92.54.45:3002/indexarr/librtbit"
repository = "https://github.com/TheDancingDeveloper-org/librtbit"

[features]
default = ["default-tls", "http-api-client"]
Expand Down Expand Up @@ -36,18 +36,18 @@ _disable_disk_write_net_benchmark = []
_disable_reconnect_test = []

[dependencies]
# Internal deps (git + tag)
bencode = { git = "http://100.92.54.45:3002/indexarr/librtbit-bencode.git", tag = "v0.1.0", package = "librtbit-bencode" }
tracker_comms = { git = "http://100.92.54.45:3002/indexarr/librtbit-tracker-comms.git", tag = "v0.1.0", package = "librtbit-tracker-comms" }
buffers = { git = "http://100.92.54.45:3002/indexarr/librtbit-buffers.git", tag = "v0.1.0", package = "librtbit-buffers" }
librtbit-core = { git = "http://100.92.54.45:3002/indexarr/librtbit-core.git", tag = "v0.1.0" }
librtbit-lsd = { git = "http://100.92.54.45:3002/indexarr/librtbit-lsd.git", tag = "v0.1.0" }
clone_to_owned = { git = "http://100.92.54.45:3002/indexarr/librtbit-clone-to-owned.git", tag = "v0.1.0", package = "librtbit-clone-to-owned" }
peer_binary_protocol = { git = "http://100.92.54.45:3002/indexarr/librtbit-peer-protocol.git", tag = "v0.1.0", package = "librtbit-peer-protocol" }
sha1w = { git = "http://100.92.54.45:3002/indexarr/librtbit-sha1-wrapper.git", tag = "v0.1.0", package = "librtbit-sha1-wrapper" }
dht = { git = "http://100.92.54.45:3002/indexarr/librtbit-dht.git", tag = "v0.1.0", package = "librtbit-dht" }
librtbit-upnp = { git = "http://100.92.54.45:3002/indexarr/librtbit-upnp.git", tag = "v0.1.0" }
upnp-serve = { git = "http://100.92.54.45:3002/indexarr/librtbit-upnp-serve.git", tag = "v0.1.0", package = "librtbit-upnp-serve", optional = true }
# Internal deps (git, GitHub, pinned v0.1.0)
bencode = { git = "https://github.com/TheDancingDeveloper-org/librtbit-bencode.git", tag = "v0.1.0", package = "librtbit-bencode" }
tracker_comms = { git = "https://github.com/TheDancingDeveloper-org/librtbit-tracker-comms.git", tag = "v0.1.0", package = "librtbit-tracker-comms" }
buffers = { git = "https://github.com/TheDancingDeveloper-org/librtbit-buffers.git", tag = "v0.1.0", package = "librtbit-buffers" }
librtbit-core = { git = "https://github.com/TheDancingDeveloper-org/librtbit-core.git", tag = "v0.1.0" }
librtbit-lsd = { git = "https://github.com/TheDancingDeveloper-org/librtbit-lsd.git", tag = "v0.1.0" }
clone_to_owned = { git = "https://github.com/TheDancingDeveloper-org/librtbit-clone-to-owned.git", tag = "v0.1.0", package = "librtbit-clone-to-owned" }
peer_binary_protocol = { git = "https://github.com/TheDancingDeveloper-org/librtbit-peer-protocol.git", tag = "v0.1.0", package = "librtbit-peer-protocol" }
sha1w = { git = "https://github.com/TheDancingDeveloper-org/librtbit-sha1-wrapper.git", tag = "v0.1.0", package = "librtbit-sha1-wrapper" }
dht = { git = "https://github.com/TheDancingDeveloper-org/librtbit-dht.git", tag = "v0.1.0", package = "librtbit-dht" }
librtbit-upnp = { git = "https://github.com/TheDancingDeveloper-org/librtbit-upnp.git", tag = "v0.1.0" }
upnp-serve = { git = "https://github.com/TheDancingDeveloper-org/librtbit-upnp-serve.git", tag = "v0.1.0", package = "librtbit-upnp-serve", optional = true }

# External deps
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "macros", "postgres"], optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/http_api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl HttpApiClient {
if root.server == "rtbit" {
return Ok(());
}
anyhow::bail!("not an rtbit server at {}", &self.base_url)
anyhow::bail!("not an rtbit server at {}", self.base_url)
}
.boxed()
}
Expand All @@ -103,7 +103,7 @@ impl HttpApiClient {
..Default::default()
};
let qs = serde_urlencoded::to_string(&params).unwrap();
let url = format!("{}torrents?{}", &self.base_url, qs);
let url = format!("{}torrents?{}", self.base_url, qs);
let response = check_response(
self.client
.post(&url)
Expand Down
2 changes: 1 addition & 1 deletion src/storage/filesystem/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl TorrentStorage for FilesystemStorage {
.with_context(|| {
format!(
"error creating a new file (because allow_overwrite = false) {:?}",
&full_path
full_path
)
})?;
OpenOptions::new().read(true).write(true).open(&full_path)?
Expand Down
8 changes: 4 additions & 4 deletions src/torrent_state/live/peer_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ impl PeerHandler {
{
anyhow::bail!(
"got request for a chunk that is not ready to upload. chunk {:?}",
&chunk_info
chunk_info
);
}

Expand Down Expand Up @@ -813,7 +813,7 @@ impl PeerHandler {
) {
Some(i) => i,
None => {
anyhow::bail!("peer sent us an invalid piece {:?}", &piece,);
anyhow::bail!("peer sent us an invalid piece {:?}", piece,);
}
};

Expand All @@ -831,8 +831,8 @@ impl PeerHandler {
if !h.inflight_requests.remove(&chunk_info) {
anyhow::bail!(
"peer sent us a piece we did not ask. Requested pieces: {:?}. Got: {:?}",
&h.inflight_requests,
&piece,
h.inflight_requests,
piece,
);
}
Ok(())
Expand Down
Loading