Enables 2018 edition

pull/10/head
Tpt 6 years ago
parent a63b81be8c
commit 610b75eaad
  1. 1
      lib/Cargo.toml
  2. 4
      lib/src/rio/ntriples/ntriples_grammar.rustpeg
  3. 6
      lib/src/rio/turtle/turtle_grammar.rustpeg
  4. 4
      lib/src/sparql/sparql_grammar.rustpeg
  5. 12
      lib/src/store/memory.rs
  6. 1
      python/Cargo.toml
  7. 1
      server/Cargo.toml

@ -10,6 +10,7 @@ description = """
An RDF and SPARQL library in Rust
"""
build = "build.rs"
edition = "2018"
[badges]
travis-ci = { repository = "Tpt/rudf" }

@ -2,9 +2,9 @@
use std::char;
use std::str::FromStr;
use model::*;
use crate::model::*;
use std::collections::BTreeMap;
use rio::utils::unescape_unicode_codepoints;
use crate::rio::utils::unescape_unicode_codepoints;
#![arguments(bnodes_map: &mut BTreeMap<String, BlankNode>)]

@ -1,10 +1,10 @@
//See https://www.w3.org/TR/turtle/#sec-grammar
use std::char;
use model::vocab::rdf;
use model::vocab::xsd;
use crate::model::vocab::rdf;
use crate::model::vocab::xsd;
use std::str::FromStr;
use rio::utils::unescape_unicode_codepoints;
use crate::rio::utils::unescape_unicode_codepoints;
#![arguments(state: &mut ParserState, buffer: &mut Vec<Triple>)]

@ -1,8 +1,8 @@
//See https://www.w3.org/TR/turtle/#sec-grammar
use std::char;
use model::vocab::rdf;
use model::vocab::xsd;
use crate::model::vocab::rdf;
use crate::model::vocab::xsd;
use std::str::FromStr;
#![arguments(state: &mut ParserState)]

@ -419,9 +419,9 @@ impl EncodedQuadsStore for MemoryStore {
if let Some(graph) = graph_indexes.get_mut(&quad.graph_name) {
{
let mut empty_pos = false;
if let Some(mut pos) = graph.spo.get_mut(&quad.subject) {
if let Some(pos) = graph.spo.get_mut(&quad.subject) {
let mut empty_os = false;
if let Some(mut os) = pos.get_mut(&quad.predicate) {
if let Some(os) = pos.get_mut(&quad.predicate) {
os.remove(&quad.object);
empty_os = os.is_empty();
}
@ -437,9 +437,9 @@ impl EncodedQuadsStore for MemoryStore {
{
let mut empty_oss = false;
if let Some(mut oss) = graph.pos.get_mut(&quad.predicate) {
if let Some(oss) = graph.pos.get_mut(&quad.predicate) {
let mut empty_ss = false;
if let Some(mut ss) = oss.get_mut(&quad.object) {
if let Some(ss) = oss.get_mut(&quad.object) {
ss.remove(&quad.subject);
empty_ss = ss.is_empty();
}
@ -455,9 +455,9 @@ impl EncodedQuadsStore for MemoryStore {
{
let mut empty_sps = false;
if let Some(mut sps) = graph.osp.get_mut(&quad.object) {
if let Some(sps) = graph.osp.get_mut(&quad.object) {
let mut empty_ps = false;
if let Some(mut ps) = sps.get_mut(&quad.subject) {
if let Some(ps) = sps.get_mut(&quad.subject) {
ps.remove(&quad.predicate);
empty_ps = ps.is_empty();
}

@ -9,6 +9,7 @@ repository = "https://github.com/Tpt/rudf"
description = """
Python bindings of the Rudf library
"""
edition = "2018"
[lib]
name = "rudf"

@ -8,6 +8,7 @@ repository = "https://github.com/Tpt/rudf"
description = """
Rudf based SPARQL server
"""
edition = "2018"
[dependencies]
rudf = {path = "../lib", features=["rocksdb"]}

Loading…
Cancel
Save