Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: panic and docs #53

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ features = ["serialize"]
opt-level = 'z'
lto = true
codegen-units = 1
panic = 'abort'
strip = 'symbols'
2 changes: 1 addition & 1 deletion dist/py/src/codemp/codemp.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Config:
port: Optional[int]
tls: Optional[bool]

def __new__(cls, username: str, password: str, **kwargs) -> Config: ...
def __new__(cls, *, username: str, password: str, **kwargs) -> Config: ...

def init() -> Driver: ...
def set_logger(logger_cb: Callable[[str], None], debug: bool) -> bool: ...
Expand Down
6 changes: 3 additions & 3 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@
//!
//! # connect first, api.code.mp is managed by hexed.technology
//! client = codemp.connect(codemp.Config(
//! username='mail@example.net',
//! password='dont-use-this-password'
//! username = "mail@example.net",
//! password = "dont-use-this-password"
//! )).wait()
//!
//! # create and join a workspace
//! client.create_workspace("some-workspace").wait()
//! workspace = client.attach_workspace("some-workspace").wait()
//!
//! # create a new buffer in this workspace and attach to it
//! workspace.create("/my/file.txt").wait()
//! workspace.create_buffer("/my/file.txt").wait()
//! buffer = workspace.attach_buffer("/my/file.txt").wait()
//!
//! # write `hello!` at the beginning of this buffer
Expand Down