MCPcopy Create free account
hub / github.com/bitfield/up2code / check

Method check

src/lib.rs:94–103  ·  view source on GitHub ↗

Fetches the canonical version of the listing from its GitHub URL. # Errors Any errors returned by the `reqwest` client.

(self)

Source from the content-addressed store, hash-verified

92 ///
93 /// Any errors returned by the `reqwest` client.
94 pub fn check(self) -> reqwest::Result<CheckedListing> {
95 let resp = HTTP.get(self.url.clone() + "?raw=true").send()?;
96 resp.error_for_status_ref()?;
97 Ok(CheckedListing {
98 title: self.title,
99 local: self.local,
100 remote: resp.text()?,
101 url: self.url,
102 })
103 }
104}
105
106/// A checked listing containing both the Markdown version and the canonical

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected