Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ rustflags = [
"-Wclippy::string_add_assign",
"-Wclippy::string_add",
"-Wclippy::string_lit_as_bytes",
"-Wclippy::string_to_string",
"-Wclippy::todo",
"-Wclippy::trait_duplication_in_bounds",
"-Wclippy::unimplemented",
Expand Down
10 changes: 5 additions & 5 deletions src/expression/parser.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
AdditionItem, LicenseItem, LicenseReq, ParseMode,
AdditionItem, AdditionRef, LicenseItem, LicenseRef, LicenseReq, ParseMode,
error::{ParseError, Reason},
expression::{ExprNode, Expression, ExpressionReq, Operator},
lexer::{Lexer, Token},
Expand Down Expand Up @@ -225,10 +225,10 @@ impl Expression {
None | Some(Token::And | Token::Or | Token::OpenParen) => {
expr_queue.push(ExprNode::Req(ExpressionReq {
req: LicenseReq {
license: LicenseItem::Other {
license: LicenseItem::Other(Box::new(LicenseRef {
doc_ref: doc_ref.map(String::from),
lic_ref: String::from(*lic_ref),
},
})),
addition: None,
},
span: lt.span.start as u32..lt.span.end as u32,
Expand Down Expand Up @@ -378,10 +378,10 @@ impl Expression {
Token::AdditionRef { doc_ref, add_ref } => match last_token {
Some(Token::With) => match expr_queue.last_mut() {
Some(ExprNode::Req(lic)) => {
lic.req.addition = Some(AdditionItem::Other {
lic.req.addition = Some(AdditionItem::Other(Box::new(AdditionRef {
doc_ref: doc_ref.map(String::from),
add_ref: String::from(*add_ref),
});
})));
}
_ => unreachable!(),
},
Expand Down
Loading