From dbba2e406a4cea48e60f7b83ce5e0b3f189cb22b Mon Sep 17 00:00:00 2001 From: Christopher Morton Date: Thu, 1 Aug 2024 20:08:35 +0100 Subject: [PATCH] Fix Efb to Efc in readme --- test_util/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_util/README.md b/test_util/README.md index 12af5d7a..f9072bcb 100644 --- a/test_util/README.md +++ b/test_util/README.md @@ -65,7 +65,7 @@ fn dotenv_override_existing_key() -> Result<(), Error> { ### Customised Envfile -Use the `EnvFileBuilder` to manipulate the content of an env file. Useful +Use the `EnvFileContents` to manipulate the content of an env file. Useful for byte-order-mark(BOM) testing, and other edge cases. ```rust @@ -74,11 +74,11 @@ use dotenvy::dotenv; #[test] fn comments_ignored_in_utf8bom_env_file() -> Result<(), Error> { - let mut efb = EnvFileBuilder::new(); - efb.insert_utf8_bom(); - efb.add_strln("# TEST_KEY=TEST_VAL"); + let mut efc = EnvFileContents::new(); + efc.push_bytes(&[0xEF, 0xBB, 0xBF]); + efc.push_str("# TEST_KEY=TEST_VAL\n"); - let testenv = TestEnv::init_with_env_file(efb)?; + let testenv = TestEnv::init_with_env_file(efc)?; test_in_env(&testenv, || { dotenv().expect(".env should be loaded");