Skip to content

Commit

Permalink
fix: fix issues with span
Browse files Browse the repository at this point in the history
Something went wrong with the merges of changes from PR #3955 into
`next` and this issue re-surfaced.
  • Loading branch information
obycode committed Dec 23, 2023
1 parent 88a068b commit 9884895
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions clarity/src/vm/ast/sugar_expander/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ impl SugarExpander {
let mut l = SymbolicExpression::list(pair.to_vec().into_boxed_slice());
if let (Some(first), Some(last)) = (pair.first(), pair.last()) {
l.set_span(
first.span.start_line,
first.span.start_column,
last.span.end_line,
last.span.end_column,
first.span().start_line,
first.span().start_column,
last.span().end_line,
last.span().end_column,
)
}
l
Expand Down Expand Up @@ -135,14 +135,14 @@ impl SugarExpander {
PreSymbolicExpressionType::Comment(comment) => {
if let Some(last_expr) = expressions.last_mut() {
// If this comment is on the same line as the last expression attach it
if last_expr.span.end_line == pre_expr.span.start_line {
if last_expr.span().end_line == pre_expr.span().start_line {
last_expr.end_line_comment = Some(comment);
} else {
// Else, attach it to the next expression
comments.push((comment, pre_expr.span));
comments.push((comment, pre_expr.span()));
}
} else {
comments.push((comment, pre_expr.span));
comments.push((comment, pre_expr.span()));
}
continue;
}
Expand Down
3 changes: 1 addition & 2 deletions stacks-common/src/types/sqlite.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use rusqlite::types::{FromSql, FromSqlError, FromSqlResult, ToSql, ToSqlOutput, ValueRef};

use super::chainstate::VRFSeed;
use crate::deps_common::bitcoin::util::hash::Sha256dHash;
use crate::types::chainstate::{
BlockHeaderHash, BurnchainHeaderHash, ConsensusHash, SortitionId, StacksBlockId, TrieHash,
Expand All @@ -8,8 +9,6 @@ use crate::util::hash::{Hash160, Sha512Trunc256Sum};
use crate::util::secp256k1::{MessageSignature, SchnorrSignature};
use crate::util::vrf::VRFProof;

use super::chainstate::VRFSeed;

impl FromSql for Sha256dHash {
fn column_result(value: ValueRef) -> FromSqlResult<Sha256dHash> {
let hex_str = value.as_str()?;
Expand Down

0 comments on commit 9884895

Please sign in to comment.