From f8cffb798c963a92fa4e19d59343ab18358db38c Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 26 Jan 2022 00:36:33 +0000 Subject: [PATCH] fix confusing doc string --- lib/src/string.rs | 7 ++++--- lib/taskchampion.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/src/string.rs b/lib/src/string.rs index 1cb716b62..1e3968004 100644 --- a/lib/src/string.rs +++ b/lib/src/string.rs @@ -92,9 +92,10 @@ impl<'a> From<&str> for TCString<'a> { /// Create a new TCString referencing the given C string. The C string must remain valid until /// after the TCString is freed. It's typically easiest to ensure this by using a static string. /// -/// NOTE: this function does _not_ take responsibility for freeing the C string itself. -/// The underlying string once the TCString has been freed. Among other times, TCStrings are -/// freed when they are passed to API functions (unless documented otherwise). For example: +/// NOTE: this function does _not_ take responsibility for freeing the C string itself. The +/// underlying string can be freed once the TCString referencing it has been freed. +/// +/// For example: /// /// ``` /// char *url = get_item_url(..); // dynamically allocate C string diff --git a/lib/taskchampion.h b/lib/taskchampion.h index 9e3354c14..786ead2c0 100644 --- a/lib/taskchampion.h +++ b/lib/taskchampion.h @@ -117,9 +117,10 @@ void tc_replica_free(struct TCReplica *rep); * Create a new TCString referencing the given C string. The C string must remain valid until * after the TCString is freed. It's typically easiest to ensure this by using a static string. * - * NOTE: this function does _not_ take responsibility for freeing the C string itself. - * The underlying string once the TCString has been freed. Among other times, TCStrings are - * freed when they are passed to API functions (unless documented otherwise). For example: + * NOTE: this function does _not_ take responsibility for freeing the C string itself. The + * underlying string can be freed once the TCString referencing it has been freed. + * + * For example: * * ``` * char *url = get_item_url(..); // dynamically allocate C string