mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-05 20:17:13 +00:00
chore: fix typos
This commit is contained in:
parent
0619d7ae89
commit
ea5f91f6a6
5 changed files with 13 additions and 9 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -10,12 +10,16 @@
|
|||
"fuzzer",
|
||||
"gmax",
|
||||
"heapless",
|
||||
"Helloii",
|
||||
"Hoexllo",
|
||||
"idlp",
|
||||
"idspan",
|
||||
"insta",
|
||||
"Itertools",
|
||||
"Kleppmann",
|
||||
"lamports",
|
||||
"Leeeon",
|
||||
"Liangrun",
|
||||
"LOGSTORE",
|
||||
"napi",
|
||||
"nextest",
|
||||
|
@ -28,6 +32,7 @@
|
|||
"reparent",
|
||||
"RUSTFLAGS",
|
||||
"smstring",
|
||||
"Stewen",
|
||||
"thiserror",
|
||||
"tinyvec",
|
||||
"txns",
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::{
|
|||
dag::DagUtils,
|
||||
delta::{TreeDelta, TreeDeltaItem, TreeInternalDiff},
|
||||
event::InternalDiff,
|
||||
history_cache::HasImportingCacheMark,
|
||||
state::TreeParentId,
|
||||
version::Frontiers,
|
||||
OpLog, VersionVector,
|
||||
|
|
|
@ -87,7 +87,7 @@ impl LoroDoc {
|
|||
LoroDoc { doc }
|
||||
}
|
||||
|
||||
/// Get the configureations of the document.
|
||||
/// Get the configurations of the document.
|
||||
#[inline]
|
||||
pub fn config(&self) -> &Configure {
|
||||
self.doc.config()
|
||||
|
@ -103,7 +103,7 @@ impl LoroDoc {
|
|||
///
|
||||
/// If enabled, the Unix timestamp will be recorded for each change automatically.
|
||||
///
|
||||
/// You can set each timestamp manually when commiting a change.
|
||||
/// You can set each timestamp manually when committing a change.
|
||||
///
|
||||
/// NOTE: Timestamps are forced to be in ascending order.
|
||||
/// If you commit a new change with a timestamp that is less than the existing one,
|
||||
|
@ -116,7 +116,7 @@ impl LoroDoc {
|
|||
/// Set the interval of mergeable changes, in milliseconds.
|
||||
///
|
||||
/// If two continuous local changes are within the interval, they will be merged into one change.
|
||||
/// The defualt value is 1000 seconds.
|
||||
/// The default value is 1000 seconds.
|
||||
#[inline]
|
||||
pub fn set_change_merge_interval(&self, interval: i64) {
|
||||
self.doc.set_change_merge_interval(interval);
|
||||
|
@ -162,7 +162,7 @@ impl LoroDoc {
|
|||
/// > In a detached state, the document is not editable, and any `import` operations will be
|
||||
/// > recorded in the `OpLog` without being applied to the `DocState`.
|
||||
///
|
||||
/// You should call `attach` to attach the `DocState` to the lastest version of `OpLog`.
|
||||
/// You should call `attach` to attach the `DocState` to the latest version of `OpLog`.
|
||||
#[inline]
|
||||
pub fn checkout(&self, frontiers: &Frontiers) -> LoroResult<()> {
|
||||
self.doc.checkout(frontiers)
|
||||
|
|
|
@ -1620,7 +1620,7 @@ fn undo_transform_cursor_position() -> anyhow::Result<()> {
|
|||
undo.undo(&doc)?;
|
||||
|
||||
// Undo will create new "Hello". They have different IDs than the original ones.
|
||||
// But the original cursors are binded on the original deleted text.
|
||||
// But the original cursors are bound on the original deleted text.
|
||||
// So internally, the cursor positions are transformed.
|
||||
|
||||
// The transformation should also consider the effect of the remote changes.
|
||||
|
|
|
@ -516,7 +516,7 @@ fn prelim_support() -> LoroResult<()> {
|
|||
let map = root_map.insert_container("child_map", map)?;
|
||||
// `map` is now attached to the doc
|
||||
map.insert("1", "223")?; // "223" now presents in the json value of doc
|
||||
let list = map.insert_container("list", LoroList::new())?; // creating subcontainer will be easier
|
||||
let list = map.insert_container("list", LoroList::new())?; // creating sub-container will be easier
|
||||
assert_eq!(
|
||||
doc.get_deep_value().to_json_value(),
|
||||
json!({
|
||||
|
@ -831,8 +831,8 @@ fn get_out_of_bound_cursor() {
|
|||
text.get_cursor(5, loro_internal::cursor::Side::Right);
|
||||
let list = a.get_list("list");
|
||||
list.get_cursor(5, loro_internal::cursor::Side::Right);
|
||||
let mlist = a.get_movable_list("list");
|
||||
mlist.get_cursor(5, loro_internal::cursor::Side::Right);
|
||||
let m_list = a.get_movable_list("list");
|
||||
m_list.get_cursor(5, loro_internal::cursor::Side::Right);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue