]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/htmldocck.py
Rollup merge of #98654 - nnethercote:pest-2.1.3-opt, r=pnkfelix
[rust.git] / src / etc / htmldocck.py
index f762e38900552748b2d1409001008e960a2a3d18..70b6af717cd384c81526a267ee437e75d134ac51 100644 (file)
@@ -417,7 +417,7 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
     snapshot_path = '{}.{}.{}'.format(rust_test_path[:-3], snapshot_name, 'html')
     try:
         with open(snapshot_path, 'r') as snapshot_file:
-            expected_str = snapshot_file.read()
+            expected_str = snapshot_file.read().replace("{{channel}}", channel)
     except FileNotFoundError:
         if bless:
             expected_str = None
@@ -429,8 +429,6 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
     else:
         actual_str = flatten(actual_tree)
 
-    expected_str = expected_str.replace("{{channel}}", channel)
-
     # Conditions:
     #  1. Is --bless
     #  2. Are actual and expected tree different