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
122122 let new_author = Signature {
123123 name,
124124 email,
125− timestamp: commit_builder.author().timestamp.clone(),
125+ timestamp: commit_builder.author().timestamp,
126126 };
127127 commit_builder.set_author(new_author);
128128 }
cli/src/commands/describe.rs+2−2
@@ -155,7 +155,7 @@ pub(crate) fn cmd_describe( · 154 unmodified lines
155155 let new_author = Signature {
156156 name,
157157 email,
158− timestamp: commit.author().timestamp.clone(),
158+ timestamp: commit.author().timestamp,
159159 };
160160 commit_builder.set_author(new_author);
161161 }
@@ -250,7 +250,7 @@ pub(crate) fn cmd_describe( · 88 unmodified lines
250250 let new_author = Signature {
251251 name,
252252 email,
253− timestamp: commit_builder.author().timestamp.clone(),
253+ timestamp: commit_builder.author().timestamp,
254254 };
255255 commit_builder = commit_builder.set_author(new_author);
256256 }
cli/src/operation_templater.rs+2−2
@@ -279,8 +279,8 @@ fn builtin_operation_methods() -> OperationTemplateBuildMethodFnMap<Operation> { · 278 unmodified lines
279279 map.insert("time", |_language, _build_ctx, self_property, function| {
280280 function.expect_no_arguments()?;
281281 let out_property = self_property.map(|op| TimestampRange {
282− start: op.metadata().start_time.clone(),
283− end: op.metadata().end_time.clone(),
282+ start: op.metadata().start_time,
283+ end: op.metadata().end_time,
284284 });
285285 Ok(L::wrap_timestamp_range(out_property))
286286 });

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