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 ca18729

Browse filesBrowse files
committed
formatting
1 parent e26aec2 commit ca18729
Copy full SHA for ca18729

File tree

2 files changed

+7
-4
lines changed
Filter options

2 files changed

+7
-4
lines changed

‎vm/src/stdlib/ctypes/base.rs

Copy file name to clipboardExpand all lines: vm/src/stdlib/ctypes/base.rs
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ impl PyCSimple {
270270
}
271271

272272
impl PyCSimple {
273-
pub fn to_arg(&self, ty: libffi::middle::Type, vm: &VirtualMachine) -> Option<libffi::middle::Arg> {
273+
pub fn to_arg(
274+
&self,
275+
ty: libffi::middle::Type,
276+
vm: &VirtualMachine,
277+
) -> Option<libffi::middle::Arg> {
274278
let value = unsafe { (*self.value.as_ptr()).clone() };
275279
if let Ok(i) = value.try_int(vm) {
276280
let i = i.as_bigint();

‎vm/src/stdlib/ctypes/function.rs

Copy file name to clipboardExpand all lines: vm/src/stdlib/ctypes/function.rs
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::builtins::{PyStr, PyTupleRef, PyTypeRef};
22
use crate::convert::ToPyObject;
33
use crate::function::FuncArgs;
4-
use crate::stdlib::ctypes::array::PyCArray;
54
use crate::stdlib::ctypes::PyCData;
5+
use crate::stdlib::ctypes::array::PyCArray;
66
use crate::stdlib::ctypes::base::{PyCSimple, ffi_type_from_str};
77
use crate::types::{Callable, Constructor};
88
use crate::{Py, PyObjectRef, PyResult, VirtualMachine};
@@ -48,8 +48,7 @@ impl Function {
4848
match converted {
4949
Some(t) => Ok(t),
5050
None => Err(vm.new_type_error(format!(
51-
"Invalid type"
52-
// TODO: add type name
51+
"Invalid type" // TODO: add type name
5352
))),
5453
}
5554
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.