added rustdoc comments

This commit is contained in:
spv 2024-08-24 19:42:12 +02:00
parent 380ee66456
commit 080a27f77d
No known key found for this signature in database
GPG Key ID: 7638A987CE28ADFA

View File

@ -1,5 +1,6 @@
use fantoccini::{elements::Element, ClientBuilder, Locator}; use fantoccini::{elements::Element, ClientBuilder, Locator};
/// Holds data about stackoverflow answers
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
struct Answer { struct Answer {
upvotes: u32, upvotes: u32,
@ -7,7 +8,9 @@ struct Answer {
content: String, content: String,
} }
// let's set up the sequence of steps we want the browser to take /// Get all answers from a stackoverflow domain. No error handling is done so get ready to either
/// check your input or "note: run with `RUST_BACKTRACE=1` environment variable to display a
/// backtrace"
async fn get_answers(url: &str) -> Vec<Answer> { async fn get_answers(url: &str) -> Vec<Answer> {
let c = ClientBuilder::native() let c = ClientBuilder::native()
.connect("http://localhost:4444") .connect("http://localhost:4444")