Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/loro-internal/examples/event.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::sync::Arc;

use loro_internal::{
cursor::PosType,
event::Diff,
handler::{Handler, ValueOrHandler},
cursor::PosType, ListHandler, LoroDoc, MapHandler, TextHandler, ToJson, TreeHandler,
ListHandler, LoroDoc, MapHandler, TextHandler, ToJson, TreeHandler,
};

fn main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1302,11 +1302,7 @@ impl RichtextState {
.unwrap_or(false)
}

pub(crate) fn range_has_style_key(
&mut self,
range: Range<usize>,
key: &StyleKey,
) -> bool {
pub(crate) fn range_has_style_key(&mut self, range: Range<usize>, key: &StyleKey) -> bool {
self.check_cache();
let result = match self.style_ranges.as_ref() {
Some(s) => s.range_contains_key(range, key),
Expand Down
2 changes: 1 addition & 1 deletion crates/loro-internal/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ pub enum PosType {
Event,
/// The index is based on the entity index.
Entity,
}
}
12 changes: 6 additions & 6 deletions crates/loro-internal/src/jsonpath/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use crate::jsonpath::errors::JSONPathError;
use crate::jsonpath::JSONPathParser;
use std::fmt::{self, Write};

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Query {
pub segments: Segment,
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum Segment {
Root {},
Child {
Expand All @@ -20,7 +20,7 @@ pub enum Segment {
},
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum Selector {
Name {
name: String,
Expand All @@ -39,7 +39,7 @@ pub enum Selector {
},
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum FilterExpression {
True_ {},
False_ {},
Expand Down Expand Up @@ -81,13 +81,13 @@ pub enum FilterExpression {
},
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum LogicalOperator {
And,
Or,
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum ComparisonOperator {
Eq,
Ne,
Expand Down
3 changes: 3 additions & 0 deletions crates/loro-internal/src/jsonpath/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
pub mod ast;
pub mod errors;
pub mod jsonpath_impl;
pub mod subscription;

pub use subscription::SubscribeJsonPathCallback;
pub mod parser;

pub use ast::Query;
Expand Down
Loading
Loading