History

refactor: mark `Timestamp` struct as `Copy`

Mateusz Mikuła committed 2 years ago

Commit 8dd30031 parent 76f40e59 files · +26 −26Browse files

Showing the changes to cli/src (3 of 9 files). Show all

Unified · Split

3 files
  1. cli/src/commands/commit.rs +1 −1
  2. cli/src/commands/describe.rs +2 −2
  3. cli/src/operation_templater.rs +2 −2
cli/src/commands/commit.rs+1−1
@@ -122,7 +122,7 @@ new working-copy commit. · 121 unmodified lines
122 let new_author = Signature {122 let new_author = Signature {
123 name,123 name,
124 email,124 email,
125 timestamp: commit_builder.author().timestamp.clone(),125 timestamp: commit_builder.author().timestamp,
126 };126 };
127 commit_builder.set_author(new_author);127 commit_builder.set_author(new_author);
128 }128 }
cli/src/commands/describe.rs+2−2
@@ -155,7 +155,7 @@ pub(crate) fn cmd_describe( · 154 unmodified lines
155 let new_author = Signature {155 let new_author = Signature {
156 name,156 name,
157 email,157 email,
158 timestamp: commit.author().timestamp.clone(),158 timestamp: commit.author().timestamp,
159 };159 };
160 commit_builder.set_author(new_author);160 commit_builder.set_author(new_author);
161 }161 }
@@ -250,7 +250,7 @@ pub(crate) fn cmd_describe( · 88 unmodified lines
250 let new_author = Signature {250 let new_author = Signature {
251 name,251 name,
252 email,252 email,
253 timestamp: commit_builder.author().timestamp.clone(),253 timestamp: commit_builder.author().timestamp,
254 };254 };
255 commit_builder = commit_builder.set_author(new_author);255 commit_builder = commit_builder.set_author(new_author);
256 }256 }
cli/src/operation_templater.rs+2−2
@@ -279,8 +279,8 @@ fn builtin_operation_methods() -> OperationTemplateBuildMethodFnMap<Operation> { · 278 unmodified lines
279 map.insert("time", |_language, _build_ctx, self_property, function| {279 map.insert("time", |_language, _build_ctx, self_property, function| {
280 function.expect_no_arguments()?;280 function.expect_no_arguments()?;
281 let out_property = self_property.map(|op| TimestampRange {281 let out_property = self_property.map(|op| TimestampRange {
282 start: op.metadata().start_time.clone(),282 start: op.metadata().start_time,
283 end: op.metadata().end_time.clone(),283 end: op.metadata().end_time,
284 });284 });
285 Ok(L::wrap_timestamp_range(out_property))285 Ok(L::wrap_timestamp_range(out_property))
286 });286 });

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t