Skip to content
Open
Changes from all 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
14 changes: 7 additions & 7 deletions src/context/full_context.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::context::Position;
use crate::context::PositionKind;
use std::borrow::Borrow;
use std::rc::Rc;
use std::sync::Arc;

/// A context that represents a span of twee code with a beginning, end, and
/// contents, along with a file name and some helper functions
Expand All @@ -10,8 +10,8 @@ pub struct FullContext {
file_name: Option<String>,
start_position: Position,
end_position: Position,
contents: Rc<String>,
line_starts: Rc<Vec<usize>>,
contents: Arc<String>,
line_starts: Arc<Vec<usize>>,
}

mod util {
Expand Down Expand Up @@ -46,8 +46,8 @@ impl FullContext {
file_name: Option<String>,
start_position: Position,
end_position: Position,
contents: Rc<String>,
line_starts: Rc<Vec<usize>>,
contents: Arc<String>,
line_starts: Arc<Vec<usize>>,
) -> Self {
FullContext {
file_name,
Expand Down Expand Up @@ -116,8 +116,8 @@ impl FullContext {
file_name,
start,
end,
Rc::new(contents),
Rc::new(line_starts),
Arc::new(contents),
Arc::new(line_starts),
)
}

Expand Down