Skip to content

Commit 1afe480

Browse files
committed
src/bin/tectonic/v2cli.rs: use as_ref() instead of clone()
This is slightly more efficient. Also delete the comment, because the intent of the relevant code is clear enough to not need explanation.
1 parent 8f58888 commit 1afe480

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/bin/tectonic/v2cli.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ impl BuildCommand {
266266
setup_options.only_cached(self.only_cached);
267267

268268
for output_name in doc.output_names() {
269-
// Added checking to see if the output name matches the specified target name
270-
if let Some(out) = self.target.clone() {
269+
if let Some(out) = self.target.as_ref() {
271270
if out != output_name {
272271
continue;
273272
}

0 commit comments

Comments
 (0)