Adds "since" to the #[deprecated] annotations

pull/705/head
Tpt 1 year ago committed by Thomas Tanon
parent 2e9ac3cc1a
commit 4756217787
  1. 2
      lib/sparesults/src/parser.rs
  2. 4
      lib/sparesults/src/serializer.rs
  3. 4
      lib/src/io/format.rs
  4. 4
      lib/src/io/read.rs
  5. 4
      lib/src/io/write.rs
  6. 12
      lib/src/store.rs

@ -109,7 +109,7 @@ impl QueryResultsParser {
}) })
} }
#[deprecated(note = "Use parse_read")] #[deprecated(note = "use parse_read", since = "0.4.0")]
pub fn read_results<R: Read>( pub fn read_results<R: Read>(
&self, &self,
reader: R, reader: R,

@ -108,7 +108,7 @@ impl QueryResultsSerializer {
} }
} }
#[deprecated(note = "Use serialize_boolean_to_write")] #[deprecated(note = "use serialize_boolean_to_write", since = "0.4.0")]
pub fn write_boolean_result<W: Write>(&self, writer: W, value: bool) -> io::Result<W> { pub fn write_boolean_result<W: Write>(&self, writer: W, value: bool) -> io::Result<W> {
self.serialize_boolean_to_write(writer, value) self.serialize_boolean_to_write(writer, value)
} }
@ -203,7 +203,7 @@ impl QueryResultsSerializer {
}) })
} }
#[deprecated(note = "Use serialize_solutions_to_write")] #[deprecated(note = "use serialize_solutions_to_write", since = "0.4.0")]
pub fn solutions_writer<W: Write>( pub fn solutions_writer<W: Write>(
&self, &self,
writer: W, writer: W,

@ -7,7 +7,7 @@ use oxrdfio::{RdfFormat, RdfParser, RdfSerializer};
/// This enumeration is non exhaustive. New formats like JSON-LD will be added in the future. /// This enumeration is non exhaustive. New formats like JSON-LD will be added in the future.
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
#[non_exhaustive] #[non_exhaustive]
#[deprecated(note = "Use RdfFormat instead")] #[deprecated(note = "use RdfFormat instead", since = "0.4.0")]
pub enum GraphFormat { pub enum GraphFormat {
/// [N-Triples](https://www.w3.org/TR/n-triples/) /// [N-Triples](https://www.w3.org/TR/n-triples/)
NTriples, NTriples,
@ -137,7 +137,7 @@ impl From<GraphFormat> for RdfSerializer {
/// This enumeration is non exhaustive. New formats like JSON-LD will be added in the future. /// This enumeration is non exhaustive. New formats like JSON-LD will be added in the future.
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
#[non_exhaustive] #[non_exhaustive]
#[deprecated(note = "Use RdfFormat instead")] #[deprecated(note = "use RdfFormat instead", since = "0.4.0")]
pub enum DatasetFormat { pub enum DatasetFormat {
/// [N-Quads](https://www.w3.org/TR/n-quads/) /// [N-Quads](https://www.w3.org/TR/n-quads/)
NQuads, NQuads,

@ -27,7 +27,7 @@ use std::io::Read;
/// assert_eq!(triples[0].subject.to_string(), "<http://example.com/s>"); /// assert_eq!(triples[0].subject.to_string(), "<http://example.com/s>");
/// # std::io::Result::Ok(()) /// # std::io::Result::Ok(())
/// ``` /// ```
#[deprecated(note = "Use RdfParser instead")] #[deprecated(note = "use RdfParser instead", since = "0.4.0")]
pub struct GraphParser { pub struct GraphParser {
inner: RdfParser, inner: RdfParser,
} }
@ -118,7 +118,7 @@ impl<R: Read> Iterator for TripleReader<R> {
/// assert_eq!(quads[0].subject.to_string(), "<http://example.com/s>"); /// assert_eq!(quads[0].subject.to_string(), "<http://example.com/s>");
/// # std::io::Result::Ok(()) /// # std::io::Result::Ok(())
/// ``` /// ```
#[deprecated(note = "Use RdfParser instead")] #[deprecated(note = "use RdfParser instead", since = "0.4.0")]
pub struct DatasetParser { pub struct DatasetParser {
inner: RdfParser, inner: RdfParser,
} }

@ -30,7 +30,7 @@ use std::io::{self, Write};
/// assert_eq!(buffer.as_slice(), "<http://example.com/s> <http://example.com/p> <http://example.com/o> .\n".as_bytes()); /// assert_eq!(buffer.as_slice(), "<http://example.com/s> <http://example.com/p> <http://example.com/o> .\n".as_bytes());
/// # Result::<_,Box<dyn std::error::Error>>::Ok(()) /// # Result::<_,Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use RdfSerializer instead")] #[deprecated(note = "use RdfSerializer instead", since = "0.4.0")]
pub struct GraphSerializer { pub struct GraphSerializer {
inner: RdfSerializer, inner: RdfSerializer,
} }
@ -113,7 +113,7 @@ impl<W: Write> TripleWriter<W> {
/// assert_eq!(buffer.as_slice(), "<http://example.com/s> <http://example.com/p> <http://example.com/o> <http://example.com/g> .\n".as_bytes()); /// assert_eq!(buffer.as_slice(), "<http://example.com/s> <http://example.com/p> <http://example.com/o> <http://example.com/g> .\n".as_bytes());
/// # Result::<_,Box<dyn std::error::Error>>::Ok(()) /// # Result::<_,Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use RdfSerializer instead")] #[deprecated(note = "use RdfSerializer instead", since = "0.4.0")]
pub struct DatasetSerializer { pub struct DatasetSerializer {
inner: RdfSerializer, inner: RdfSerializer,
} }

@ -517,7 +517,7 @@ impl Store {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?);
/// # Result::<_, Box<dyn std::error::Error>>::Ok(()) /// # Result::<_, Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use Store.load_from_read instead")] #[deprecated(note = "use Store.load_from_read instead", since = "0.4.0")]
pub fn load_graph( pub fn load_graph(
&self, &self,
read: impl Read, read: impl Read,
@ -560,7 +560,7 @@ impl Store {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?);
/// # Result::<_, Box<dyn std::error::Error>>::Ok(()) /// # Result::<_, Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use Store.load_from_read instead")] #[deprecated(note = "use Store.load_from_read instead", since = "0.4.0")]
pub fn load_dataset( pub fn load_dataset(
&self, &self,
read: impl Read, read: impl Read,
@ -1222,7 +1222,7 @@ impl<'a> Transaction<'a> {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?);
/// # Result::<_,oxigraph::store::LoaderError>::Ok(()) /// # Result::<_,oxigraph::store::LoaderError>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use Transaction.load_from_read instead")] #[deprecated(note = "use Transaction.load_from_read instead", since = "0.4.0")]
pub fn load_graph( pub fn load_graph(
&mut self, &mut self,
read: impl Read, read: impl Read,
@ -1265,7 +1265,7 @@ impl<'a> Transaction<'a> {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?);
/// # Result::<_,oxigraph::store::LoaderError>::Ok(()) /// # Result::<_,oxigraph::store::LoaderError>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use Transaction.load_from_read instead")] #[deprecated(note = "use Transaction.load_from_read instead", since = "0.4.0")]
pub fn load_dataset( pub fn load_dataset(
&mut self, &mut self,
read: impl Read, read: impl Read,
@ -1685,7 +1685,7 @@ impl BulkLoader {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, ex))?);
/// # Result::<_, Box<dyn std::error::Error>>::Ok(()) /// # Result::<_, Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use BulkLoader.load_from_read instead")] #[deprecated(note = "use BulkLoader.load_from_read instead", since = "0.4.0")]
pub fn load_dataset( pub fn load_dataset(
&self, &self,
read: impl Read, read: impl Read,
@ -1744,7 +1744,7 @@ impl BulkLoader {
/// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?); /// assert!(store.contains(QuadRef::new(ex, ex, ex, GraphNameRef::DefaultGraph))?);
/// # Result::<_, Box<dyn std::error::Error>>::Ok(()) /// # Result::<_, Box<dyn std::error::Error>>::Ok(())
/// ``` /// ```
#[deprecated(note = "Use BulkLoader.load_from_read instead")] #[deprecated(note = "use BulkLoader.load_from_read instead", since = "0.4.0")]
pub fn load_graph( pub fn load_graph(
&self, &self,
read: impl Read, read: impl Read,

Loading…
Cancel
Save