Skip to content

Commit

Permalink
make method variables infallible
Browse files Browse the repository at this point in the history
  • Loading branch information
pchampin committed Aug 28, 2020
1 parent 34a3db7 commit c36a147
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/sparql.rs
Expand Up @@ -85,7 +85,7 @@ where
D: SparqlDataset + ?Sized,
{
/// Return the list of SELECTed variable names
fn variables(&self) -> Result<Vec<String>, D::SparqlError>;
fn variables(&self) -> Vec<&str>;
}

/// A dummy module to check that implementing these traits is actually possible
Expand All @@ -109,8 +109,8 @@ mod dummy {
}
}
impl SparqlBindings<MyDataset> for MyBindings {
fn variables(&self) -> Result<Vec<String>, Infallible> {
Ok(vec!["s".to_string()])
fn variables(&self) -> Vec<&str> {
vec!["s"]
}
}

Expand Down

0 comments on commit c36a147

Please sign in to comment.