commit
5599d8eb07
2 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ site-icons https://github.com
|
||||||
```rust
|
```rust
|
||||||
use site_icons::Icons;
|
use site_icons::Icons;
|
||||||
|
|
||||||
let icons = Icons::new();
|
let mut icons = Icons::new();
|
||||||
// scrape the icons from a url
|
// scrape the icons from a url
|
||||||
icons.load_website("https://github.com").await?;
|
icons.load_website("https://github.com").await?;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ let entries = icons.entries().await;
|
||||||
|
|
||||||
// entries are sorted from highest to lowest resolution
|
// entries are sorted from highest to lowest resolution
|
||||||
for icon in entries {
|
for icon in entries {
|
||||||
println("{:?}", icon)
|
println!("{:?}", icon)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use site_icons::Icons;
|
//! use site_icons::Icons;
|
||||||
//!
|
//!
|
||||||
//! let icons = Icons::new();
|
//! let mut icons = Icons::new();
|
||||||
//! // scrape the icons from a url
|
//! // scrape the icons from a url
|
||||||
//! icons.load_website("https://github.com").await?;
|
//! icons.load_website("https://github.com").await?;
|
||||||
//!
|
//!
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
//!
|
//!
|
||||||
//! // entries are sorted from highest to lowest resolution
|
//! // entries are sorted from highest to lowest resolution
|
||||||
//! for icon in entries {
|
//! for icon in entries {
|
||||||
//! println("{:?}", icon)
|
//! println!("{:?}", icon)
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
|
Reference in a new issue