Format
This commit is contained in:
parent
9d982a2723
commit
fe3f10387c
@ -69,7 +69,6 @@ pub fn set(options: &Options) -> Result<String, KakError> {
|
|||||||
// Get the actual operation we are performing
|
// Get the actual operation we are performing
|
||||||
let (left_register, operation, right_register) = parse_arguments(&options.args[..])?;
|
let (left_register, operation, right_register) = parse_arguments(&options.args[..])?;
|
||||||
|
|
||||||
|
|
||||||
// Get the selections for the left register and the right register, depending on the arguments
|
// Get the selections for the left register and the right register, depending on the arguments
|
||||||
// Underscore is a special case. We will treat it as the current selection
|
// Underscore is a special case. We will treat it as the current selection
|
||||||
let (left_selections, right_selections) = match (&left_register, &right_register) {
|
let (left_selections, right_selections) = match (&left_register, &right_register) {
|
||||||
@ -93,8 +92,8 @@ pub fn set(options: &Options) -> Result<String, KakError> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get the frequency of each selection. The count does not matter as much as presence
|
// Get the frequency of each selection. The count does not matter as much as presence
|
||||||
// Count is used only for compare
|
// Count is used only for compare
|
||||||
let (left_ordered_counts, right_ordered_counts) = (
|
let (left_ordered_counts, right_ordered_counts) = (
|
||||||
to_ordered_counts(options, left_selections),
|
to_ordered_counts(options, left_selections),
|
||||||
to_ordered_counts(options, right_selections),
|
to_ordered_counts(options, right_selections),
|
||||||
@ -110,7 +109,7 @@ pub fn set(options: &Options) -> Result<String, KakError> {
|
|||||||
.collect::<LinkedHashSet<&Selection>>(),
|
.collect::<LinkedHashSet<&Selection>>(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Run the actual set operation
|
// Run the actual set operation
|
||||||
let result = key_set_operation(&operation, &left_keys, &right_keys);
|
let result = key_set_operation(&operation, &left_keys, &right_keys);
|
||||||
|
|
||||||
match &operation {
|
match &operation {
|
||||||
|
Loading…
Reference in New Issue
Block a user