Commit e1a6347
committed
Refactor shuffle and update documentation
- Add early return for invalid sizes to shuffle
- Rename variables to be more descriptive
- Refactor moving list element, removing unnecessary operations
- Unwrap if clause for adding to history because the condition is
guaranteed by the guard clause
- Inline the value 0 for the ReorderEvent
- Update documentation to reflect new changes1 parent bf8e879 commit e1a6347
1 file changed
Lines changed: 22 additions & 15 deletions
Lines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
436 | 443 | | |
437 | 444 | | |
438 | 445 | | |
439 | | - | |
440 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
441 | 450 | | |
442 | 451 | | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
447 | 455 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 456 | | |
452 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
| |||
0 commit comments