twixter

A twtxt command line client in Rust

git clone git://git.shimmy1996.com/twixter.git
commit 19d630d8313595d57cba4c8bd9da6c0a37a113f2
parent d809bdb9cff509fa60d941b61fc7912e8b88eb9e
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Fri,  4 Oct 2019 17:08:49 -0400

Rename to_string to to_twtxt

Diffstat:
Msrc/entry.rs | 4++--
Msrc/tweet.rs | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/entry.rs b/src/entry.rs
@@ -36,8 +36,8 @@ impl Entry {
         }
     }
 
-    /// Generates spec representation for given entry.
-    pub fn to_string(&self) -> String {
+    /// Generates string representation per twtxt spec for given entry.
+    pub fn to_twtxt(&self) -> String {
         format!(
             "{}\t{}\n",
             &self.timestamp.to_rfc3339_opts(SecondsFormat::Secs, true),
diff --git a/src/tweet.rs b/src/tweet.rs
@@ -41,7 +41,7 @@ pub fn tweet(config: &Config, subcommand: &ArgMatches) {
             .create(true)
             .open(Path::new(&config.twtfile))
             .unwrap()
-            .write(Entry::new(content, None).to_string().as_bytes())
+            .write(Entry::new(content, None).to_twtxt().as_bytes())
             .expect("Unable to write new post");
 
         // Run post tweet hook.