Commit bf78290
fix(backend-2fa): fix pre-existing compile breakage on main (#1279)
backend-2fa did not compile at all on main:
- 7 TwoFactorHandlers constructors never initialized the enroll_lock
field after it was added, causing E0063 struct-literal errors.
- TenantScopedStore had all the right inherent methods but was never
declared as `impl TwoFactorStore for TenantScopedStore`, so
`Arc::new(scoped_store)` could not coerce to Arc<dyn TwoFactorStore>
(E0277) in TwoFactorHandlers::for_tenant.
Also fixes what was blocking `cargo test` specifically (separate from
the two `cargo build` errors above): two missing imports and one
moved-value error in tests.rs, plus makes the test-only
`test_two_factor_store` helper accessible from tests.rs so a
for-tenant test exercises the real shared store instead of an
unrelated local one.
Not in scope / not touched here (pre-existing, unrelated, disclosed in
the PR description): 4 test failures revealed now that the suite can
actually run, and ~135 clippy warnings-as-errors across the crate.
Co-authored-by: samuel2926i39-art <samuel2926i39-art@users.noreply.github.com>1 parent 372ab8f commit bf78290
3 files changed
Lines changed: 164 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| |||
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| 452 | + | |
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| |||
494 | 496 | | |
495 | 497 | | |
496 | 498 | | |
| 499 | + | |
497 | 500 | | |
498 | 501 | | |
499 | 502 | | |
| |||
507 | 510 | | |
508 | 511 | | |
509 | 512 | | |
| 513 | + | |
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
| |||
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| 522 | + | |
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
| |||
554 | 559 | | |
555 | 560 | | |
556 | 561 | | |
| 562 | + | |
557 | 563 | | |
558 | 564 | | |
559 | 565 | | |
| |||
571 | 577 | | |
572 | 578 | | |
573 | 579 | | |
| 580 | + | |
574 | 581 | | |
575 | 582 | | |
576 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5441 | 5441 | | |
5442 | 5442 | | |
5443 | 5443 | | |
5444 | | - | |
5445 | | - | |
| 5444 | + | |
| 5445 | + | |
| 5446 | + | |
5446 | 5447 | | |
5447 | 5448 | | |
5448 | 5449 | | |
| |||
6445 | 6446 | | |
6446 | 6447 | | |
6447 | 6448 | | |
6448 | | - | |
| 6449 | + | |
6449 | 6450 | | |
6450 | 6451 | | |
6451 | 6452 | | |
| |||
6545 | 6546 | | |
6546 | 6547 | | |
6547 | 6548 | | |
6548 | | - | |
6549 | | - | |
6550 | | - | |
6551 | | - | |
| 6549 | + | |
| 6550 | + | |
6552 | 6551 | | |
6553 | 6552 | | |
6554 | 6553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
1367 | 1517 | | |
1368 | 1518 | | |
1369 | 1519 | | |
| |||
0 commit comments