8000 refactor: sort `gc()` by alphabet · RustPython/RustPython@a79528a · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a79528a

Browse files
committed
refactor: sort gc() by alphabet
1 parent 985b9a4 commit a79528a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

vm/src/stdlib/builtins.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ mod builtins {
3838
const CODEGEN_NOT_SUPPORTED: &str =
3939
"can't compile() to bytecode when the `codegen` feature of rustpython is disabled";
4040

41-
#[pyfunction]
42-
fn gc() -> PyResult<usize> {
43-
#[cfg(feature = "gc")]
44-
{
45-
use crate::object::gc::GLOBAL_COLLECTOR;
46-
Ok(GLOBAL_COLLECTOR.force_gc())
47-
}
48-
#[cfg(not(feature = "gc"))]
49-
Ok(0)
50-
}
51-
5241
#[pyfunction]
5342
fn abs(x: PyObjectRef, vm: &VirtualMachine) -> PyResult {
5443
vm._abs(&x)
@@ -343,6 +332,17 @@ mod builtins {
343332
call_object_format(vm, value, None, format_spec.as_str())
344333
}
345334

335+
#[pyfunction]
336+
fn gc() -> PyResult<usize> {
337+
#[cfg(feature = "gc")]
338+
{
339+
use crate::object::gc::GLOBAL_COLLECTOR;
340+
Ok(GLOBAL_COLLECTOR.force_gc())
341+
}
342+
#[cfg(not(feature = "gc"))]
343+
Ok(0)
344+
}
345+
346346
#[pyfunction]
347347
fn getattr(
348348
obj: PyObjectRef,

0 commit comments

Comments
 (0)
0