Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed Apr 19, 2024
1 parent 58e7fdc commit 6cf8c4d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = 1
test_patterns = [
"butane/tests/**",
test_patterns = [
"butane/tests/**",
]

[[analyzers]]
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ root = true
end_of_line = lf
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[butane_cli/src/main.rs]
max_line_length = 400
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ implementation detail to the API consumer.
* Ability to embed migrations in Rust code (so that a library may easily bundle its migrations)
* SQLite and PostgreSQL backends
* Write entirely or nearly entirely the same code regardless of database backend

## Getting Started

_Models_, declared with struct attributes define the database
Expand Down
7 changes: 7 additions & 0 deletions butane_core/src/db/pg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@ fn define_column(col: &AColumn) -> Result<String> {
if col.unique() {
constraints.push("UNIQUE".to_string());
}
if constraints.is_empty() {
return Ok(format!(
"{} {}",
helper::quote_reserved_word(col.name()),
col_sqltype(col)?,
));
}
Ok(format!(
"{} {} {}",
helper::quote_reserved_word(col.name()),
Expand Down
3 changes: 1 addition & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ fn main() {
println!("{}", post.title);
println!("----------\n");
println!("{}", post.body);

}
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title TEXT NOT NULL,
body TEXT NOT NULL,
published BOOLEAN NOT NULL,
blog BIGINT NOT NULL,
byline TEXT
byline TEXT
);
CREATE TABLE Post_tags_Many (
owner INTEGER NOT NULL,
Expand Down

0 comments on commit 6cf8c4d

Please sign in to comment.