Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/JohnnyMorganz/StyLua into…
Browse files Browse the repository at this point in the history
… var-expression-comments
  • Loading branch information
JohnnyMorganz committed Jul 20, 2022
2 parents 638f079 + f386cf1 commit 7937a3f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/cli/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct Opt {
pub files: Vec<PathBuf>,
}

#[derive(ArgEnum, Clone, Copy, Debug, PartialEq)]
#[derive(ArgEnum, Clone, Copy, Debug, PartialEq, Eq)]
#[clap(rename_all = "PascalCase")]
pub enum Color {
/// Always use colour
Expand Down
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use full_moon::{
tokenizer::{Token, TokenType},
};

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum FormatNode {
/// The formatting is completely blocked via an ignore comment, so this node should be skipped
Skip,
Expand Down
8 changes: 4 additions & 4 deletions src/formatters/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,15 +1030,15 @@ fn hang_binop_expression(
),
format_expression_internal(
ctx,
&*rhs,
&rhs,
ExpressionContext::UnaryOrBinary,
rhs_shape,
),
),
ExpressionSide::Right => (
format_expression_internal(
ctx,
&*lhs,
&lhs,
ExpressionContext::UnaryOrBinary,
lhs_shape,
),
Expand All @@ -1064,7 +1064,7 @@ fn hang_binop_expression(
} else {
format_expression_internal(
ctx,
&*lhs,
&lhs,
ExpressionContext::UnaryOrBinary,
shape,
)
Expand All @@ -1075,7 +1075,7 @@ fn hang_binop_expression(
} else {
format_expression_internal(
ctx,
&*rhs,
&rhs,
ExpressionContext::UnaryOrBinary,
shape,
)
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum EndTokenType {
#[macro_export]
macro_rules! fmt_symbol {
($ctx:expr, $token:expr, $x:expr, $shape:expr) => {
crate::formatters::general::format_symbol(
$crate::formatters::general::format_symbol(
$ctx,
$token,
&TokenReference::symbol($x).unwrap(),
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod shape;
mod verify_ast;

/// The type of indents to use when indenting
#[derive(Debug, Copy, Clone, PartialEq, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
pub enum IndentType {
/// Indent using tabs (`\t`)
Expand All @@ -27,7 +27,7 @@ impl Default for IndentType {
}

/// The type of line endings to use at the end of a line
#[derive(Debug, Copy, Clone, PartialEq, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
pub enum LineEndings {
// Auto,
Expand All @@ -44,7 +44,7 @@ impl Default for LineEndings {
}

/// The style of quotes to use within string literals
#[derive(Debug, Copy, Clone, PartialEq, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
pub enum QuoteStyle {
/// Use double quotes where possible, but change to single quotes if it produces less escapes
Expand All @@ -64,7 +64,7 @@ impl Default for QuoteStyle {
}

/// When to use call parentheses
#[derive(Debug, Copy, Clone, PartialEq, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
pub enum CallParenType {
/// Use call parentheses all the time
Expand All @@ -84,7 +84,7 @@ impl Default for CallParenType {
}

/// What mode to use if we want to collapse simple functions / guard statements
#[derive(Debug, Copy, Clone, PartialEq, Deserialize)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(target_arch = "wasm32", wasm_bindgen)]
pub enum CollapseSimpleStatement {
/// Never collapse
Expand Down

0 comments on commit 7937a3f

Please sign in to comment.