Make DRW
an option instead of raw pointer
#133
check.yml
on: pull_request
nightly / fmt
11s
nightly / doc
27s
Matrix: clippy
Annotations
41 errors and 3 warnings
creating a mutable reference to mutable static is discouraged:
src/handlers.rs#L363
error: creating a mutable reference to mutable static is discouraged
--> src/handlers.rs:363:29
|
363 | drw::resize(DRW.as_mut(), SW as c_uint, BH as c_uint);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L2059
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:2059:27
|
2059 | drw::cur_free(DRW.as_mut().unwrap(), cur);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1551
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1551:13
|
1551 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1547
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1547:27
|
1547 | drw::rect(DRW.as_mut(), x, 0, w as u32, BH as u32, 1, 1);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1544
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1544:21
|
1544 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1533
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1533:25
|
1533 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1522
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1522:21
|
1522 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1514
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1514:21
|
1514 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1500
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1500:13
|
1500 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1498
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1498:24
|
1498 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize));
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1482
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1482:21
|
1482 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1470
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1470:17
|
1470 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1460
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1460:17
|
1460 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1433
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1433:17
|
1433 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1430
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1430:28
|
1430 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize));
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1416
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1416:22
|
1416 | let boxw = (*DRW.as_ref().unwrap().fonts).h / 6 + 2;
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1415
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1415:22
|
1415 | let boxs = (*DRW.as_ref().unwrap().fonts).h / 9;
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1407
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1407:36
|
1407 | unsafe { drw::fontset_getwidth(DRW.as_mut(), x) as c_int + LRPAD }
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1353
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1353:13
|
1353 | DRW.as_mut().unwrap().gc,
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1346
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1346:13
|
1346 | DRW.as_ref().unwrap().gc,
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
= note: `-D static-mut-refs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(static_mut_refs)]`
|
creating a mutable reference to mutable static is discouraged:
src/handlers.rs#L363
error: creating a mutable reference to mutable static is discouraged
--> src/handlers.rs:363:29
|
363 | drw::resize(DRW.as_mut(), SW as c_uint, BH as c_uint);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L2059
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:2059:27
|
2059 | drw::cur_free(DRW.as_mut().unwrap(), cur);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1551
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1551:13
|
1551 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1547
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1547:27
|
1547 | drw::rect(DRW.as_mut(), x, 0, w as u32, BH as u32, 1, 1);
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1544
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1544:21
|
1544 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1533
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1533:25
|
1533 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1522
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1522:21
|
1522 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1514
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1514:21
|
1514 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1500
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1500:13
|
1500 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1498
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1498:24
|
1498 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize));
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1482
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1482:21
|
1482 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1470
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1470:17
|
1470 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1460
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1460:17
|
1460 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1433
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1433:17
|
1433 | DRW.as_mut(),
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1430
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1430:28
|
1430 | drw::setscheme(DRW.as_mut(), *SCHEME.add(Scheme::Norm as usize));
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1416
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1416:22
|
1416 | let boxw = (*DRW.as_ref().unwrap().fonts).h / 6 + 2;
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1415
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1415:22
|
1415 | let boxs = (*DRW.as_ref().unwrap().fonts).h / 9;
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1407
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1407:36
|
1407 | unsafe { drw::fontset_getwidth(DRW.as_mut(), x) as c_int + LRPAD }
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a mutable reference to mutable static is discouraged:
src/main.rs#L1353
error: creating a mutable reference to mutable static is discouraged
--> src/main.rs:1353:13
|
1353 | DRW.as_mut().unwrap().gc,
| ^^^^^^^^^^^^ mutable reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
|
creating a shared reference to mutable static is discouraged:
src/main.rs#L1346
error: creating a shared reference to mutable static is discouraged
--> src/main.rs:1346:13
|
1346 | DRW.as_ref().unwrap().gc,
| ^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
= note: `-D static-mut-refs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(static_mut_refs)]`
|
nightly / clippy
Clippy had exited with the 101 exit code
|
nightly / fmt
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
nightly / doc
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
nightly / clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|