diff options
author | Oxbian <oxbian@mailbox.org> | 2025-02-21 16:17:00 -0500 |
---|---|---|
committer | Oxbian <oxbian@mailbox.org> | 2025-02-21 16:17:00 -0500 |
commit | bc53ad567b82ca354f2b8caf30f242717a5f46a6 (patch) | |
tree | 95da9eb36b5a905516bf98e3c88a7af3b19ced1d /src/helper | |
parent | 3930939d96a50ab41deddbc9fd6ef2b5cc29369e (diff) | |
download | NAI-bc53ad567b82ca354f2b8caf30f242717a5f46a6.tar.gz NAI-bc53ad567b82ca354f2b8caf30f242717a5f46a6.zip |
feat: scrollable chatbox
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/init.rs | 12 | ||||
-rw-r--r-- | src/helper/mod.rs | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/helper/init.rs b/src/helper/init.rs new file mode 100644 index 0000000..392e4fb --- /dev/null +++ b/src/helper/init.rs @@ -0,0 +1,12 @@ +use std::fs::File; +use std::io::{self, Write}; + +pub fn print_in_file(content: String) -> io::Result<()> { + // Open the file (create it if it doesn't exist, or truncate it if it does) + let mut file = File::create("debug.txt")?; + + // Write the content to the file + file.write_all(content.as_bytes())?; + + Ok(()) +} diff --git a/src/helper/mod.rs b/src/helper/mod.rs new file mode 100644 index 0000000..43763f1 --- /dev/null +++ b/src/helper/mod.rs @@ -0,0 +1 @@ +pub mod init; |