Skip to content

Commit

Permalink
add bash completions, run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Feb 26, 2024
1 parent 0035d7d commit 434e9e2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/devcontainers/rust:bookworm
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
app:
build:
context: ..
image: mcr.microsoft.com/devcontainers/rust:bookworm
dockerfile: .devcontainer/Dockerfile
depends_on:
- db
command: sleep infinity
Expand Down
6 changes: 6 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ ln -s /cypher-dto/.devcontainer/.bash_history ~/.bash_history

# Install dotfiles
gh repo clone dotfiles ~/dotfiles && ~/dotfiles/install.sh

# rustup and cargo bash completion.
sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends bash-completion \
&& mkdir -p ~/.local/share/bash-completion/completions \
&& rustup completions bash > ~/.local/share/bash-completion/completions/rustup \
&& rustup completions bash cargo > ~/.local/share/bash-completion/completions/cargo
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target/
.Trash-*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
target/
.bash_history
.Trash-*
8 changes: 2 additions & 6 deletions lib/tests/common/fixtures/worked_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ impl TryFrom<Row> for WorkedAt {
impl RelationEntity for WorkedAt {
type Id = WorkedAtId;
fn identifier(&self) -> Self::Id {
WorkedAtId {
until: self.until,
}
WorkedAtId { until: self.until }
}
}
impl TryFrom<Relation> for WorkedAt {
Expand Down Expand Up @@ -71,9 +69,7 @@ impl RelationId for WorkedAtId {
}
impl From<WorkedAt> for WorkedAtId {
fn from(value: WorkedAt) -> Self {
WorkedAtId {
until: value.until,
}
WorkedAtId { until: value.until }
}
}
impl TryFrom<Relation> for WorkedAtId {
Expand Down
1 change: 0 additions & 1 deletion macros/src/derive/entity/new_and_getters.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::{ArgHelper, Entity};
use quote::{__private::TokenStream, quote};


pub fn impl_new_and_getters(entity: &Entity) -> TokenStream {
let entity_ident = entity.ident();
let mut idents = Vec::new();
Expand Down

0 comments on commit 434e9e2

Please sign in to comment.