Skip to content

Left over debug println in proxy implementation should be removed #148

Closed
@MitchellBerend

Description

@MitchellBerend

fn asset_url(&self, asset_id: u32) -> String {
println!("{:?}", &self.proxy);
format!(
"https://api.github.com/repos/{owner}/{repo}/releases/assets/{asset_id}",
owner = self.owner,
repo = self.repo,
asset_id = asset_id
)
}
pub fn fetch_release_info(&self) -> Result<Release, Box<dyn Error>> {
println!("{:?}", &self.proxy);
let release_url = self.release_url();
let req = match &self.proxy {
Some(proxy) => {
let agent = ureq::AgentBuilder::new().proxy(proxy.clone()).build();
add_auth_header(
agent
.get(&release_url)
.set("Accept", "application/vnd.github+json")
.set("User-Agent", "chshersh/tool-sync-0.2.0"),
)
}
None => add_auth_header(
ureq::get(&release_url)
.set("Accept", "application/vnd.github+json")
.set("User-Agent", "chshersh/tool-sync-0.2.0"),
),
};

These 2 functions have left over println calls from development. These look really weird when syncing a bunch of tools, instead of reusing the first shell line tool will print out None or the proxy passed in and continue to do that until all info is fetched.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershacktoberfesthttps://hacktoberfest.com/outputFancy (and not so) output of the tool

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions