Skip to content

Commit c7bea2d

Browse files
committed
what the warning i hate rust
1 parent 51b3211 commit c7bea2d

5 files changed

Lines changed: 113 additions & 47 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "Rust",
33
"image": "mcr.microsoft.com/devcontainers/rust:latest",
44
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6+
"moby": false
7+
}
68
},
79
"portsAttributes": {
810
"8080": {

Cargo.lock

Lines changed: 105 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/update_oauth_resources.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - rg
66
# - jq
77

8-
# Fetch iOS app versions
8+
# Fetch iOS app versions (DOES NOT WORK)
99
ios_version_list=$(curl -s "https://ipaarchive.com/app/usa/1064216828" | rg "(20\d{2}\.\d+.\d+) / (\d+)" --only-matching -r "Version \$1/Build \$2" | sort | uniq)
1010

1111
# Count the number of lines in the version list
@@ -38,6 +38,7 @@ done
3838
# Close the array in the source file
3939
echo "];" >> "$filename"
4040

41+
# !CLOUDFLARE BOT PROTECTION!
4142
# Fetch Android app versions
4243
page_1=$(curl -s "https://apkcombo.com/reddit/com.reddit.frontpage/old-versions/" | rg "<a class=\"ver-item\" href=\"(/reddit/com\.reddit\.frontpage/download/phone-20\d{2}\.\d+\.\d+-apk)\" rel=\"nofollow\">" -r "https://apkcombo.com\$1" | sort | uniq | sed 's/ //g')
4344
# Append with pages
@@ -80,7 +81,7 @@ done
8081
# Close the array in the source file
8182
echo "];" >> "$filename"
8283

83-
# Retrieve iOS versions
84+
# Retrieve iOS versions (ALSO DOES NOT WORK)
8485
table=$(curl -s "https://en.wikipedia.org/w/api.php?action=parse&page=IOS_17&prop=wikitext&section=31&format=json" | jq ".parse.wikitext.\"*\"" | rg "(17\.[\d\.]*)\\\n\|(\w*)\\\n\|" --only-matching -r "Version \$1 (Build \$2)")
8586

8687
# Count the number of lines in the version list

src/oauth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Oauth {
7575
pub(crate) async fn new() -> Self {
7676
// Try MobileSpoofAuth first, then fall back to GenericWebAuth
7777
let mut failure_count = 0;
78-
//let mut backend = OauthBackendImpl::MobileSpoof(MobileSpoofAuth::new());
78+
let mut _backend_not_used = OauthBackendImpl::MobileSpoof(MobileSpoofAuth::new());
7979
let mut backend = OauthBackendImpl::GenericWeb(GenericWebAuth::new()); // Use generic web auth
8080

8181
loop {

src/subreddit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ async fn subreddit(sub: &str, quarantined: bool) -> Result<Subreddit, String> {
569569

570570
// Metadata regarding the subreddit
571571
let members: i64 = res["data"]["subscribers"].as_u64().unwrap_or_default() as i64;
572-
let active: i64 = res["data"]["accounts_active"].as_u64().unwrap_or_default() as i64;
572+
let active: i64 = res["data"]["accounts_active"].as_u64().unwrap_or_default() as i64; // TODO: does not work
573573

574574
// Fetch subreddit icon either from the community_icon or icon_img value
575575
let community_icon: &str = res["data"]["community_icon"].as_str().unwrap_or_default();

0 commit comments

Comments
 (0)