Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
ion
Commits
c2e4e8cf
Commit
c2e4e8cf
authored
9 years ago
by
stratact
Browse files
Options
Downloads
Patches
Plain Diff
Use shadowing and cleanup
parent
a955378d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!53
Code cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+4
-4
4 additions, 4 deletions
src/main.rs
with
4 additions
and
4 deletions
src/main.rs
+
4
−
4
View file @
c2e4e8cf
...
...
@@ -274,7 +274,7 @@ impl Command {
Command
{
name
:
"history"
,
help
:
"Display all commands previously executed"
,
main
:
box
|
args
:
&
[
String
],
shell
:
&
mut
Shell
|
{
main
:
box
|
_
:
&
[
String
],
shell
:
&
mut
Shell
|
{
for
command
in
shell
.history
.clone
()
{
println!
(
"{}"
,
command
);
}
...
...
@@ -335,12 +335,12 @@ fn main() {
shell
.print_prompt
();
if
let
Some
(
command
_original
)
=
readln
()
{
let
command
=
command
_original
.trim
();
if
let
Some
(
command
)
=
readln
()
{
let
command
=
command
.trim
();
if
command
==
"exit"
{
break
;
}
else
if
!
command
.is_empty
()
{
shell
.on_command
(
&
command
,
&
commands
);
shell
.on_command
(
command
,
&
commands
);
}
}
else
{
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment